-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
apply UnusedLocalVariable
#34489
base: main
Are you sure you want to change the base?
apply UnusedLocalVariable
#34489
Conversation
Signed-off-by: Vincent Potucek <[email protected]>
…e 'testBean'. [UnusedLocalVariable]
…er'. [UnusedLocalVariable]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question
String value = "Sample"; | ||
Method[] methods = String.class.getMethods(); | ||
methods = Integer.class.getMethods(); | ||
// String.class.getMethods(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I'm wondering if the field is required for the test or if just the method call triggers the hint.
I was not able to run it locally—it seems to be special because of the annotation.
Normally, I test locally, but I was not able to. Please excuse this.
@@ -1,10 +1,10 @@ | |||
root = true | |||
|
|||
[*.{adoc,bat,groovy,html,java,js,jsp,kt,kts,md,properties,py,rb,sh,sql,svg,txt,xml,xsd}] | |||
[*] | |||
charset = utf-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for clarification, is the intent to not make this the default?
I have never seen it otherwise, only globally, with the most common encoding being UTF-8.
This is new to me—my previous knowledge was that properties files were the only files not normally encoded in UTF-8, but now even they have switched.
"As of Java 9, properties files switched from being loaded using ISO-8859-1."
Source
Encounter unused code with help of CS module
UnusedLocalVariable
.Wondering why the CS config needs to be duplicated. The rules seem not to be applied, some of the findings only emerge after adding the corresponding module again.