-
Notifications
You must be signed in to change notification settings - Fork 422
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
Added Scalastyle #37
Added Scalastyle #37
Conversation
…e config xml the indentation formatting IntelliJ craved
Thanks for putting this together @cdalzell! I applied it and took a look at the warnings. Do you know how to disable the warnings for magic numbers and wildcard imports? |
</parameters> | ||
</check> | ||
<check level="warning" class="org.scalastyle.scalariform.ImportGroupingChecker" enabled="true"></check> | ||
</scalastyle> |
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.
nit: add a newline here
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.
Whoops.. That's a pet peeve of mine too. :)
You can disable the rules in certain areas of code by using special comments (as noted in the scalastyle-config.xml). If you want them to not evaluate at all, just commenting them out or removing them from the config file will take care of that. Were you wanting them totally disabled? |
Yeah, I think wildcard imports are generally acceptable when enough classes are used, and magic numbers show up often enough in tests that reporting them will be more of a nuisance than a boon. |
Alright, disabled both those rules |
Wunderbar, merging this |
Added scalastyle to the project, but otherwise made no changes. I'll make a separate cleanup branch in my fork once this goes in because I thought the addition should stand by itself.
Scalastyle will execute as part of mvn compile. Errors and warnings will be logged to the console and scalastyle-output.xml in the root directory.
Scalastyle is currently configured in the pom.xml to only block compilation if a rule marked "error" is violated. Right now all rules are set to "warning" in the config file, so that shouldn't be an issue until someone locks the rules down further.