-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add funcorder linter #5630
base: main
Are you sure you want to change the base?
Add funcorder linter #5630
Conversation
Hey, thank you for opening your first Pull Request ! |
For some reason, when I try to run:
I get the errors that I am expecting, but the |
In order for a pull request adding a linter to be reviewed, the linter and the PR must follow some requirements.
Pull Request Description
Linter
The Linter Tests Inside Golangci-lint
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
# Conflicts: # .golangci.next.reference.yml
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
is there something else expected from me? or I just need to wait for this PR to be approved or rejected? |
For now, you just have to wait. |
@@ -529,6 +531,14 @@ linters: | |||
# Default: false | |||
analyze-types: true | |||
|
|||
funcorder: | |||
# Enable/disable feature to check constructors are placed after struct declaration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add .
at the end for consistency:
# Enable/disable feature to check constructors are placed after struct declaration | |
# Enable/disable feature to check constructors are placed after struct declaration. |
# Enable/disable feature to check constructors are placed after struct declaration | ||
# Default: true | ||
constructor: false | ||
# Enable/disable feature to check whether the exported struct's methods are placed before the non-exported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Enable/disable feature to check whether the exported struct's methods are placed before the non-exported | |
# Enable/disable feature to check whether the exported struct's methods are placed before the non-exported. |
This linter detects that the exported method for a struct are placed before the non-exported methods. It also detects that the
NewXYZ
functions are placed after the struct declaration and before the struct's methods.Following the uber style guidelines about function-grouping-and-ordering.
Repository: https://github.com/manuelarte/funcorder