Skip to content

Issue #16435: introduce UnusedLocalMethodCheck (RSPEC-S1144)#16435

Closed
Pankraz76 wants to merge 1 commit intocheckstyle:masterfrom
Pankraz76:UnusedPrivateMethodCheck-pr
Closed

Issue #16435: introduce UnusedLocalMethodCheck (RSPEC-S1144)#16435
Pankraz76 wants to merge 1 commit intocheckstyle:masterfrom
Pankraz76:UnusedPrivateMethodCheck-pr

Conversation

@Pankraz76
Copy link
Copy Markdown

@Pankraz76 Pankraz76 commented Feb 27, 2025

Issue #16435: introduce UnusedLocalMethodCheck (RSPEC-S1144)

Comment thread src/it/java/org/checkstyle/base/AbstractItModuleTestSupport.java Outdated
Comment thread src/test/java/com/puppycrawl/tools/checkstyle/AbstractModuleTestSupport.java Outdated
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch from 4f6a252 to f9b73bd Compare February 27, 2025 19:03
@Pankraz76 Pankraz76 marked this pull request as ready for review February 27, 2025 19:04
@Pankraz76 Pankraz76 changed the title RSPEC-S1144: UnusedLocalMethodCheck RSPEC-S1144 Add UnusedLocalMethodCheck Feb 27, 2025
@Pankraz76
Copy link
Copy Markdown
Author

is this any good?

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.

Direction is good, but CI should be green

@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 2 times, most recently from b24a8a0 to 015b919 Compare February 28, 2025 09:22
@Pankraz76 Pankraz76 changed the title RSPEC-S1144 Add UnusedLocalMethodCheck Issue checkstyle#16375: (RSPEC-S1144) introduce UnusedLocalMethodCheck Feb 28, 2025
@Pankraz76 Pankraz76 changed the title Issue checkstyle#16375: (RSPEC-S1144) introduce UnusedLocalMethodCheck Issue #16375: (RSPEC-S1144) introduce UnusedLocalMethodCheck Feb 28, 2025
unused.catch.parameter=Неиспользуемый параметр catch ''{0}'' должен быть безымянным.
unused.lambda.parameter=Неиспользуемый лямбда-параметр ''{0}'' должен быть безымянным.
unused.local.var=Неиспользуемая локальная переменная ''{0}''.
unused.local.method=Неиспользуемая локальная переменная ''{0}''.
Copy link
Copy Markdown
Author

@Pankraz76 Pankraz76 Feb 28, 2025

Choose a reason for hiding this comment

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

mostly its c&p as I could not even encode this locally.

Comment thread src/site/xdoc/checks/coding/unusedlocalmethod.xml Outdated
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 2 times, most recently from 09a718f to 2504d30 Compare February 28, 2025 09:38
@Pankraz76 Pankraz76 marked this pull request as draft February 28, 2025 09:38
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 11 times, most recently from e01d8c5 to 024d8d0 Compare March 1, 2025 23:54
Copy link
Copy Markdown
Author

@Pankraz76 Pankraz76 left a comment

Choose a reason for hiding this comment

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

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  04:02 min
[INFO] Finished at: 2025-03-02T01:02:41+01:00
[INFO] ------------------------------------------------------------------------
➜  checkstyle git:(UnusedPrivateMethodCheck-pr) 

Comment thread .editorconfig
@@ -0,0 +1,20 @@
[*]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

without this is was impossible for me to apply the rules as idk how to outfix them and align them with the IDE out of the box. Thanks

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.

if you really want to have this file, you need to create new issue, explain all details on what is it for and what are benefits. this will let us to evaluate if we can have it in repo and it will not interfere with others.

We try to be IDE agnostic, as people use a lot of editors and very diffeerent version.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, it's kind of agnostic as it supports all common editors out of the box.

It's a good thing to extract things into a separate PR, but I need to be able to work on the code without having to configure like crazy. I will delete it right before merging. There are still some issues left.

#16543

@Pankraz76 Pankraz76 requested a review from romani March 2, 2025 00:04
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 2 times, most recently from 600f71f to 8828f6b Compare March 18, 2025 18:36
@Pankraz76 Pankraz76 marked this pull request as ready for review March 18, 2025 18:36
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 3 times, most recently from 9ae74f1 to 58d8547 Compare March 19, 2025 07:47
@Pankraz76 Pankraz76 marked this pull request as draft March 19, 2025 08:04
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 3 times, most recently from b9382f3 to 9e35bff Compare March 19, 2025 15:33
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 2 times, most recently from 48649f9 to 266514c Compare March 21, 2025 09:54
Comment thread src/site/site.xml Outdated
href="checks/coding/unusedcatchparametershouldbeunnamed.html"/>
<item name="UnusedLambdaParameterShouldBeUnnamed"
href="checks/coding/unusedlambdaparametershouldbeunnamed.html"/>
<item name="UnusedLocalMethod" href="checks/coding/unusedlocalmethod.html"/>
Copy link
Copy Markdown
Author

@Pankraz76 Pankraz76 Mar 21, 2025

Choose a reason for hiding this comment

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

wrong format should be found by #16598

@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch from 266514c to 3c1b39d Compare March 21, 2025 10:02
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch from 6aa93a1 to 6d2452f Compare March 23, 2025 11:03
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch 2 times, most recently from c50cd91 to 77b569d Compare March 26, 2025 07:23
@Pankraz76 Pankraz76 changed the title Issue #16375: (RSPEC-S1144) introduce UnusedLocalMethodCheck Issue #16375: introduce UnusedLocalMethodCheck (RSPEC-S1144) Mar 26, 2025
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch from 77b569d to 442b9d2 Compare March 26, 2025 07:46
@Pankraz76 Pankraz76 changed the title Issue #16375: introduce UnusedLocalMethodCheck (RSPEC-S1144) Issue #16435: introduce UnusedLocalMethodCheck (RSPEC-S1144) Mar 26, 2025
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Apr 4, 2025
@Pankraz76 Pankraz76 force-pushed the UnusedPrivateMethodCheck-pr branch from 442b9d2 to aa01fe1 Compare April 4, 2025 14:44
@Pankraz76
Copy link
Copy Markdown
Author

#16894

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.

2 participants