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

Update Tests to use new 'verifyXxxxxx' method or 'execute' that use inlined config in Input files #11446

Open
18 of 19 tasks
romani opened this issue Mar 20, 2022 · 73 comments
Open
18 of 19 tasks

Comments

@romani
Copy link
Member

romani commented Mar 20, 2022

this is phase 2 of updates at #10390 (comment)
please see related commit to see how to update code and remove suppression line.

Test need to be updated:

suppression that was added at #11441 should be reemoved.

each Test should be updated in separate PR to ease review.

all usages of verify method should be changed to verifyWithInlineConfigParser or similar method that use Inlined to Input file configs. If not possible update to use execute method when test expect exception during execution and checking of violation is not required. Review #13951 on how to use test modules(inner lcasses) from config.

There are several test methods that create internal Check just to cover code by test and no verification of Java code, so execute method should be used instead verify.

ATTENTION: if migration is done for class, remove it from pom.xml in forbiddenapis-test config.

@nrmancuso
Copy link
Member

I am on it, updating for AllSinglelineCommentsTest

nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Mar 21, 2022
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Mar 21, 2022
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Mar 21, 2022
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Mar 21, 2022
@ghulamrabbani883
Copy link

Can I work on this issue

@romani
Copy link
Member Author

romani commented Mar 21, 2022

Yes, select one, do comment "I am on ..." and send PR.
Please keep in mind, it is better to resolve first gsoc, second gsoc , before doing this "third".

@romani
Copy link
Member Author

romani commented Mar 21, 2022

EmptyLineSeparatorCheckTest

Will be covered at #11408
@Kevin222004, fyi.

nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Mar 21, 2022
nrmancuso added a commit to nrmancuso/checkstyle that referenced this issue Mar 21, 2022
pbludov pushed a commit that referenced this issue Mar 21, 2022
@romani romani changed the title Update Tests to use new verify method that use inlined config in Input files Update Tests to use new 'verifyXxxxxx' method or 'execute' that use inlined config in Input files Mar 27, 2022
@Kevin222004
Copy link
Collaborator

@Rahulkhinchi03 Please give a look to this

EmptyLineSeparatorCheckTest

Will be covered at #11408 @Kevin222004, fyi.

It will be covering at #11408 it has been already mentioned by @romani , in conversation

@Rahulkhinchi03
Copy link
Member

@Kevin222004 It was my mistake to open a PR on that. I am closing the PR. Thank you!

@Kevin222004
Copy link
Collaborator

Kevin222004 commented Mar 29, 2022

@romani Please look at this

final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
verify(createChecker(checkConfig), getPath("InputMethodParamPad4.java"), expected);

While working on the issue #11214 i have noticed this I guess this should also be updated

@Kevin222004
Copy link
Collaborator

@romani ping,

please let me know if I am wrong

@romani
Copy link
Member Author

romani commented Mar 31, 2022

Yes it should be updated to use execute method

@Vyom-Yadav
Copy link
Member

Vyom-Yadav commented Apr 3, 2022

@romani @nick-mancuso Why does execute use the traditional way of building configurations and not the parser? If the reason behind it is that it traverses all the lines in the file to setViolations then a execute method could be made that just set the configuration using the input file and parser and does not set violations.

@nrmancuso
Copy link
Member

Why does execute use the traditional way of building configurations and not the …

The “check” that I created it for was not a real check, we just needed to execute a fake check with no properties on code to count lines. We should not use this method for real checks, IMO.

#11447

relentless-pursuit pushed a commit to relentless-pursuit/checkstyle that referenced this issue Feb 11, 2024
piyush-1234 added a commit to piyush-1234/checkstyle that referenced this issue Feb 12, 2024
chrccl added a commit to chrccl/checkstyle that referenced this issue Feb 16, 2024
chrccl added a commit to chrccl/checkstyle that referenced this issue Feb 17, 2024
…acters

Issue checkstyle#11446: Update checker test method testUnmappableCharacters using xml config
chrccl added a commit to chrccl/checkstyle that referenced this issue Feb 17, 2024
chrccl added a commit to chrccl/checkstyle that referenced this issue Feb 19, 2024
…acters

Issue checkstyle#11446: Update checker test method testUnmappableCharacters using xml config
chrccl added a commit to chrccl/checkstyle that referenced this issue Feb 19, 2024
chrccl added a commit to chrccl/checkstyle that referenced this issue Feb 19, 2024
…acters

Issue checkstyle#11446: Update checker test method testUnmappableCharacters using xml config
chrccl added a commit to chrccl/checkstyle that referenced this issue Feb 19, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Feb 26, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Feb 26, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Feb 26, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Feb 26, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Mar 5, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Mar 5, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Mar 6, 2024
MANISH-K-07 added a commit to MANISH-K-07/checkstyle that referenced this issue Mar 6, 2024
@github-actions github-actions bot modified the milestones: 10.14.0, 10.14.1 Mar 6, 2024
0xbakry pushed a commit to 0xbakry/checkstyle that referenced this issue Mar 13, 2024
LakshmiSowmya04 pushed a commit to LakshmiSowmya04/checkstyle that referenced this issue Apr 5, 2024
LakshmiSowmya04 pushed a commit to LakshmiSowmya04/checkstyle that referenced this issue Apr 9, 2024
LakshmiSowmya04 pushed a commit to LakshmiSowmya04/checkstyle that referenced this issue Apr 21, 2024
LakshmiSowmya04 pushed a commit to LakshmiSowmya04/checkstyle that referenced this issue Apr 21, 2024
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