-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines should look outside of functions #851
Comments
This is checked indirectly by other sniffs, that require N lines (defaults to 1) to be between methods in a class. |
+1 on this one. It''s working only in methods. Right now it can be used as:
You would expect it to work in a context of a class. MediaWiki sniff linked above works like a charm. |
There is missing checks since there is no check between constants or comments for example. |
Thanks, do you remember which sniff is it? |
Any update here? I'd rather not bug my team about this and not all IDEs handle this automatically. |
@LasseRafn @Luc45 This code did trick for me squizwhitespacefunctionspacing. |
Currently,
Squiz.WhiteSpace.SuperfluousWhitespace
only looks inside functions forEmptyLines
, but aren't multiple empty lines a concern even outside of functions?The MediaWiki codesniffer standard recently had this implemented as a custom sniff (wikimedia/mediawiki-tools-codesniffer@3a6709b), and we were wondering if it could be upstreamed.
The text was updated successfully, but these errors were encountered: