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

Issue #2186: Exception message extended to provide more information on incorrect parent #4166

Merged
merged 1 commit into from
Apr 11, 2017

Conversation

subkrish
Copy link
Contributor

@subkrish subkrish commented Apr 6, 2017

Issue #2186

@codecov-io
Copy link

codecov-io commented Apr 6, 2017

Codecov Report

Merging #4166 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #4166   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files         283     283           
  Lines       14824   14824           
  Branches     3389    3389           
======================================
  Hits        14824   14824
Impacted Files Coverage Δ
...va/com/puppycrawl/tools/checkstyle/TreeWalker.java 100% <ø> (ø) ⬆️
...puppycrawl/tools/checkstyle/api/AutomaticBean.java 100% <100%> (ø) ⬆️

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 d876c65...775da65. Read the comment docs.

"TreeWalker is not allowed as a parent of " + name);
"TreeWalker is not allowed as a parent of " + name
+ " Please review 'Parent Module' section for this Check in web"
+ " documentation if Checks is standard.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checks -> Check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@rnveach
Copy link
Member

rnveach commented Apr 7, 2017

No tests need changing because the current test just checks the start of the message and we only changed the end.

assertTrue(exception.getMessage().contains("TreeWalker is not allowed as a parent of"));

@rnveach
Copy link
Member

rnveach commented Apr 7, 2017

Since we are changing this message, I think we should also change the default one in AutomaticBean.

throw new CheckstyleException(childConf.getName() + " is not allowed as a child in "

childConf.getName() + " is not allowed as a child in " + getConfiguration().getName()

@romani You ok with this?

@romani
Copy link
Member

romani commented Apr 9, 2017

@subkrish , please apply suggestion from @rnveach . I am ok with new message. Ready to merge.

@subkrish
Copy link
Contributor Author

subkrish commented Apr 9, 2017

@romani @rnveach Changes have been made. Please review.

@rnveach
Copy link
Member

rnveach commented Apr 9, 2017

@romani Please review and merge.

@romani romani merged commit 4cef3f9 into checkstyle:master Apr 11, 2017
@subkrish subkrish deleted the fix-issue-2186 branch April 11, 2017 04:53
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.

5 participants