Skip to content

should not complain about unnecessary whitespace if func decleration is spread over multiple lines #2

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

Closed
ghost opened this issue Oct 3, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 3, 2019

https://github.com/anz-bank/sysl/blob/master/sysl2/sysl/parse/parse.go#L316 is triggering this new linter to complain about the empty line between the func line and the code. In my opinion, removing that empty line makes this much less readable (in that the code gets lost in the parameter list).

https://github.com/anz-bank/sysl/blob/8e4fac991a393c5af362e83ab0a0687fbcb23dd6/sysl2/sysl/sysl.go#L76 on the other-hand is a reasonable error.

Can you please allow this construct (or add a configuration option to allow it?)

@NiseVoid
Copy link
Contributor

NiseVoid commented Oct 4, 2019

Similar to the multi-line if statement issue, I added a setting that will enforce a newline after a multi-line function declaration.

I opened a PR on golangci-lint to update it to the new version. golangci/golangci-lint#786

@ghost
Copy link
Author

ghost commented Oct 6, 2019

Awesome! Thanks

@NiseVoid NiseVoid closed this as completed Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant