Skip to content

Add Maven Checkstyle - #323

Merged
goneall merged 4 commits into
spdx:masterfrom
bact:add-stylecheck
Sep 21, 2026
Merged

goneall merged 4 commits into
spdx:masterfrom
bact:add-stylecheck

Conversation

@bact

@bact bact commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Add Maven Checkstyle correctness check in CI.

Can run mvn checkstyle:check from command line too.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact bact added the test Unit test, code coverage, test case label Sep 18, 2026
@goneall

goneall commented Sep 18, 2026

Copy link
Copy Markdown
Member

Running this locally, I'm getting two checkstyle errors on the current codebase:

[ERROR] src\main\java\org\spdx\tools\schema\AbstractOwlRdfConverter.java:[224,94] (coding) EqualsAvoidNull: String literal expressions should be on the left side of an equals comparison.
[ERROR] src\main\java\org\spdx\tools\Verify.java:[232,59] (coding) ModifiedControlVariable: Control variable 'verifyMsg' is modified.

We should fix those before merging this in to avoid CI failures.

@goneall

goneall commented Sep 18, 2026

Copy link
Copy Markdown
Member

Running this locally, I'm getting two checkstyle errors on the current codebase:

[ERROR] src\main\java\org\spdx\tools\schema\AbstractOwlRdfConverter.java:[224,94] (coding) EqualsAvoidNull: String literal expressions should be on the left side of an equals comparison.
[ERROR] src\main\java\org\spdx\tools\Verify.java:[232,59] (coding) ModifiedControlVariable: Control variable 'verifyMsg' is modified.

We should fix those before merging this in to avoid CI failures.

I just noticed the configuration won't cause it to fail on validation, so this should be fine.

@bact - if you could resolve the merge conflict, I'll go ahead and merge it

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact

bact commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator Author

Running this locally, I'm getting two checkstyle errors on the current codebase:

[ERROR] src\main\java\org\spdx\tools\schema\AbstractOwlRdfConverter.java:[224,94] (coding) EqualsAvoidNull: String literal expressions should be on the left side of an equals comparison.
[ERROR] src\main\java\org\spdx\tools\Verify.java:[232,59] (coding) ModifiedControlVariable: Control variable 'verifyMsg' is modified.

Fixed.

Also resolved merge conflicts.

I also set checkstyle fail on violation = true.

@goneall
goneall merged commit 6efc4dc into spdx:master Sep 21, 2026
3 checks passed
@bact
bact deleted the add-stylecheck branch September 21, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Unit test, code coverage, test case

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants