Skip to content
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

Merged
merged 10 commits into from
Jul 27, 2015
Merged

Added Scalastyle #37

merged 10 commits into from
Jul 27, 2015

Conversation

cdalzell
Copy link
Contributor

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.

@sryza
Copy link
Owner

sryza commented Jul 21, 2015

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>
Copy link
Owner

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

Copy link
Contributor Author

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. :)

@cdalzell
Copy link
Contributor Author

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?

@sryza
Copy link
Owner

sryza commented Jul 23, 2015

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.

@cdalzell
Copy link
Contributor Author

Alright, disabled both those rules

@sryza
Copy link
Owner

sryza commented Jul 27, 2015

Wunderbar, merging this

sryza added a commit that referenced this pull request Jul 27, 2015
@sryza sryza merged commit 4a7a7a3 into sryza:master Jul 27, 2015
@cdalzell cdalzell deleted the feature/scalastyle branch July 29, 2015 01:38
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

Successfully merging this pull request may close these issues.

2 participants