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

Add tabWidth to Checker and FileSets #6485

Closed
rnveach opened this issue Feb 26, 2019 · 3 comments

Comments

Projects
None yet
2 participants
@rnveach
Copy link
Member

commented Feb 26, 2019

Taken from #2116 (comment) ,

AbstractFileSetCheck doesn't use tabWidth in the violation like AbstractCheck does, so the column numbers for violations is incorrect. There are no checkstyle file sets that put violations on the line AND column number, but we are a util and this could be useful to someone else making their own custom check, if not to us in the future.
We should make AbstractCheck's and AbstractFileSetCheck's log methods similar.

FileSet's log: https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractFileSetCheck.java#L155-L157
AbstractCheck's log: https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/AbstractCheck.java#L248-L256

@rnveach

This comment has been minimized.

Copy link
Member Author

commented Feb 26, 2019

Should all file sets and checks specify tabWidth as a property in the documentation?

@rnveach

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2019

@romani I updated the issue description because I wrongly stated that a check's violation is based on the column position and could change with a tab when it was infact just the line number being printed in the violation. This doesn't effect any of our file sets right now, but will still be needed for #2116 and is an issue for anyone making their own custom file set.

rnveach added a commit to rnveach/checkstyle that referenced this issue Mar 4, 2019

romani added a commit that referenced this issue Mar 14, 2019

@romani romani added the new feature label Mar 14, 2019

@romani romani added this to the 8.19 milestone Mar 14, 2019

@romani

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

Fix is merged, doc need to be improved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.