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

Remove extra parens around static field references #300

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

athos
Copy link
Member

@athos athos commented Feb 15, 2024

A recent update on clj-kondo has introduced a new linter java-static-field-call, which checks if a reference to a Java static field has extra parens around it, and now it is enabled by default and will be reported as errors.

I found some portion of cljam code caught by the linter. This PR fixes it all.

$ clj-kondo --lint src:test | grep error
src/cljam/io/wig.clj:92:31: error: Expected: throwable, received: string.
test/cljam/io/bam_test.clj:46:10: error: Static fields should be referenced without parens unless they are intended as function calls
test/cljam/io/bam_test.clj:47:10: error: Static fields should be referenced without parens unless they are intended as function calls
test/cljam/io/bam_test.clj:48:10: error: Static fields should be referenced without parens unless they are intended as function calls
test/cljam/io/bam_test.clj:49:10: error: Static fields should be referenced without parens unless they are intended as function calls
test/cljam/io/bam_test.clj:50:10: error: Static fields should be referenced without parens unless they are intended as function calls
test/cljam/io/gff_test.clj:319:70: error: Unresolved symbol: ?str
linting took 2004ms, errors: 7, warnings: 3
$

@athos athos self-assigned this Feb 15, 2024
@athos athos requested review from alumi and a team as code owners February 15, 2024 05:13
@athos athos requested review from r6eve and removed request for a team February 15, 2024 05:13
@athos athos assigned alumi and r6eve Feb 15, 2024
Copy link
Member

@alumi alumi left a comment

Choose a reason for hiding this comment

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

Thank you for the fixes! LGTM 👍

Copy link
Contributor

@r6eve r6eve left a comment

Choose a reason for hiding this comment

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

LGTM!

@r6eve r6eve merged commit ec9c199 into master Feb 15, 2024
18 checks passed
@r6eve r6eve deleted the fix/static-field-calls branch February 15, 2024 09:44
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.

3 participants