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

Throwing exception when checker fails to run #297

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mccartney
Copy link
Contributor

@mccartney mccartney commented Feb 11, 2018

Scalastyle checker silently swallows exceptions, e.g. Scalastyle runs fine with the following configuration file reporting no errors:

<scalastyle>
  <name>Scalastyle configuration</name>
  <check level="error" class="this.does.not.Exist!" enabled="true"/>
</scalastyle>

It's error-prone. A project can keep thinking its configuration is right, while it's a simple typo in class name.

The downside of the solution is that it reports an error for each checked file. I believe it's strictly better than the current swallowing though.

@codecov-io
Copy link

codecov-io commented Feb 11, 2018

Codecov Report

Merging #297 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #297   +/-   ##
=====================================
  Coverage       0%     0%           
=====================================
  Files          59     59           
  Lines        1464   1464           
  Branches      147    147           
=====================================
  Misses       1464   1464
Impacted Files Coverage Δ
src/main/scala/org/scalastyle/Checker.scala 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54198e2...d37967e. Read the comment docs.

@matthewfarwell
Copy link
Member

Thanks for thie PR. I need to think about this, and I'll get back to you.

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.

None yet

3 participants