Skip to content

Issue #13012: Use toASCIIString for all URIs#13016

Closed
reftel wants to merge 1 commit intocheckstyle:masterfrom
reftel:feature/to_ascii_string
Closed

Issue #13012: Use toASCIIString for all URIs#13016
reftel wants to merge 1 commit intocheckstyle:masterfrom
reftel:feature/to_ascii_string

Conversation

@reftel
Copy link
Copy Markdown

@reftel reftel commented Apr 21, 2023

Resolves Issue #13012.

Copy link
Copy Markdown
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

thanks a lot for fix.

Please add URI.toString to forbidden list of methods https://github.com/checkstyle/checkstyle/blob/master/config/signatures.txt (please share build out put failure to prove that it works), to avoid this problem in future completely.

We need green CI. Please follow CI failures.

items:

Copy link
Copy Markdown
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

Thanks a lot.
Please keep an eye on CI , all must be green.

Items:

try {
final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
verifyWithInlineConfigParser(configInDirWithNonAsciiCharacters.toString(), expected);
assertWithMessage("Test should fail if exception was not thrown").fail();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need test that show that validation works.

Can you put here full path after copy, it should be loaded.
Test should sounds easy: we cop file to folder with Unicode, we run validation, all works. ( Same as as your issue sounds)

@reftel
Copy link
Copy Markdown
Author

reftel commented Apr 24, 2023

circleci run-inspections fails because it thinks the Unicode escapes for æøå are unnecessary, but leaving them leads to a Checkstyle failure:

[ERROR] [checkstyle] [ERROR] /Users/[username]src/checkstyle/checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/checks/header/HeaderCheckTest.java:207: Line matches the illegal pattern '[^\p{ASCII}]'. [checkASCII]

So, the CI setup is at odds with the checkstyle configuration.

@reftel
Copy link
Copy Markdown
Author

reftel commented Apr 24, 2023

And then there are more PITest failures, due to missing test cases for error message formatting.

What started out as a obviously correct one-line fix has balooned into writing test cases for error message formatting and fixing broken CI setups. It is no longer worth the effort. We´ll just pin our version of maven-checkstyle-plugin to one that works instead.

@reftel reftel closed this Apr 24, 2023
@michael-o
Copy link
Copy Markdown
Contributor

And then there are more PITest failures, due to missing test cases for error message formatting.

What started out as a obviously correct one-line fix has balooned into writing test cases for error message formatting and fixing broken CI setups. It is no longer worth the effort. We´ll just pin our version of maven-checkstyle-plugin to one that works instead.

Very sad, overconstraint checking here.

@romani
Copy link
Copy Markdown
Member

romani commented Apr 24, 2023

Yes delivery will quality is not easy. We will wait for someone who have more time to fix it.

@AayushSaini101
Copy link
Copy Markdown
Contributor

@romani Can I take this issue? I want to work on this after my current pending issue

@romani
Copy link
Copy Markdown
Member

romani commented Oct 8, 2023

@AayushSaini101 , please be welcome take this issue.
We appreciate your help.

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.

4 participants