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

Enforce FileTabCharacter and RegexpSingleline for trailing whitespace over resources #5941

Open
romani opened this issue Jun 16, 2018 · 7 comments

Comments

@romani
Copy link
Member

romani commented Jun 16, 2018

uncomment configuration at: https://github.com/checkstyle/checkstyle/blob/master/config/checkstyle_resources_checks.xml#L18-L24

fix all violations.
It is better to split violation resolving in few PRs for each Check.
UT might be required to be updated - but ideally should not be updated.

@rnveach
Copy link
Member

rnveach commented Nov 4, 2018

RegexpSingleline has 1000 violations.
FileTab has 145 violations.

@rnveach
Copy link
Member

rnveach commented Mar 10, 2019

@romani When are tabs/spaces part of the tests outside of indentation/filetab ?
AST/Javadoc printing is picking them up in their results. Is it ok to change them and cause differences in tests?

A lot of inputs say they have tabs on purpose. naming, sizes, todo, whitespace, plain text suppression. It makes it a little tougher to identify them and will require more suppressions.

@romani
Copy link
Member Author

romani commented Mar 18, 2019

When are tabs/spaces part of the tests outside of indentation/filetab ?

Naming should not have tabs .

A lot of inputs say they have tabs on purpose

It might be copy paste.

whitespace, plain text suppression.

Such grops can have tabs, but it is better to limit such inputs to certain list.

will require more suppressions.

Yes, I am completely ok with this. Ideally input files will have "withTabs" in names, so suppression will be easy. But as first step, list of inputs with certain names is good.

@rnveach
Copy link
Member

rnveach commented Jun 30, 2019

Javadooc grammar may need an extra fix for new lines. I am seeing this on Windows:

|           |--ATTRIBUTE -> ATTRIBUTE [38:10]
|           |   |--HTML_TAG_NAME -> attr [38:10]
|           |   |--EQUALS -> = [38:14]
|           |   `--ATTR_VALUE -> "something" [38:15]
|           |--WS ->   [38:27]
|           |--NEWLINE -> \n [38:28]

gets converted to:

|           |--ATTRIBUTE -> ATTRIBUTE [38:10]
|           |   |--HTML_TAG_NAME -> attr [38:10]
|           |   |--EQUALS -> = [38:14]
|           |   `--ATTR_VALUE -> "something"\r [38:15]
|           |--NEWLINE -> \n [38:27]

which has the random \r on the end of the attribute value.

@romani
Copy link
Member Author

romani commented Jul 9, 2019

Check still need to be enforced in config, but most of code changes is done

@Boukhalfa11
Copy link

I am a student and I am a new to this projects, can i take this issue, and how can I help with this issue please ?

@romani
Copy link
Member Author

romani commented Mar 25, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants