-
Notifications
You must be signed in to change notification settings - Fork 280
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
JavaCheckstyle and Scalastyle #366
Comments
Hey @szafirov, What does running |
It seems to ignore the last error, which is what was happening when I only had that. Perhaps I should include the scalastyle_config.xml, so here it is: Thanks! |
Looks like you've configured Overcommit to use |
You are right, I made a mistake the first time and edited my comment. Please check the latest above. |
Do you have |
And no, you can't specify different config files for different file patterns through Overcommit. You could create a custom hook that does this, though. |
Ok, I think the problem is specifically with the rule:
This rule tries to enforce an empty line at the end of the file, but because it is missing, overcommit might not be marking it as a line that can be reported on and skips it. That's my hypothesis anyway. If you examine the output while debugging:
For now I will remove that rule from my scalastyle to avoid the issue. Thanks. |
You're right, we were skipping over messages with no line number. #368 should fix it. |
I can't seem to get the same errors when running the pre-commit hook and with the command line directly. I don't know if it's a bug or my setup is wrong.
File .overcommit.yml content:
Invoking overcommit:
When running directly with scalastyle command line:
Some errors do show, such as if I add a println statement, it will get caught by both.
The text was updated successfully, but these errors were encountered: