Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Conversation

@ferhatelmas
Copy link
Contributor

@ferhatelmas ferhatelmas commented Nov 29, 2017

  • no length for map initialization
  • don't check for boolean/error return
  • don't format string
  • use string method of bytes buffer instead of converting bytes to string
  • use strings.Contains instead of strings.Index
  • use bytes.Equal instead of bytes.Compare

 - no length for map initialization
 - don't check for boolean/error return
 - don't format string
 - use string method of bytes buffer instead of converting bytes to
string
 - use `strings.Contains` instead of `strings.Index`
 - use `bytes.Equal` instead of `bytes.Compare`
Copy link
Contributor

@orirawlings orirawlings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🎈

This looks great. Did you use gofmt -r <rewrite_rule> to produce these fixes, or were these produced by hand? I'm just curious if there might be other similar cases still remaining in the code.

@mcuadros mcuadros merged commit 7ced032 into src-d:master Nov 29, 2017
@ferhatelmas ferhatelmas deleted the simplify branch December 1, 2017 08:56
@ferhatelmas
Copy link
Contributor Author

@orirawlings I used gosimple. I don't think we have more code for defined rules but there might be missing rules.

@mcuadros any plan to integrate gometalinter into CI ? IMHO, lint rules must be fixed before thinking about it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants