Skip to content

Conversation

@jlerbsc
Copy link
Contributor

@jlerbsc jlerbsc commented May 15, 2024

This PR is an experiment to fix the rule Sonar s1319 "Declarations should use Java collection interfaces such as 'List' rather than specific implementation classes such as 'LinkedList'". Note that the scope of this PR is intentionally limited to the biojava-core module and some of its dependencies.

It's a bit complicated on the Biojava project because the Sonar rule raises a few false positives and the project makes extensive use of interface implementations and sometimes methods that are implementation-specific. But after a few manual adjustments to standardise the modifications in the dependent modules, the tests pass with the exception of the TestCrystallographicMetadata.test1zna:92 test in the biojava-integrationtest module. I'm not convinced that the error stems from these modifications, but I'll let you be the judge.

Below is a link to the sonar page describing the problem https://rules.sonarsource.com/java/tag/bad-practice/RSPEC-1319/.

Indepth has fixed 102 issues that would have taken about 2 days to correct manually.

@jlerbsc
Copy link
Contributor Author

jlerbsc commented May 15, 2024

There sometimes seem to be problems with the BerkeleyScopInstallationTest.

Copy link
Contributor

@josemduarte josemduarte left a comment

Choose a reason for hiding this comment

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

LGTM thank you!

I've triggered the tests task that failed. But 3 of them have succeeded so I guess the TestCrystallographicMetadata.test1zna is working fine.

@jlerbsc
Copy link
Contributor Author

jlerbsc commented May 22, 2024

Does this mean that you are going to merge this PR? If so, I'll try to continue resolving this issue.

@josemduarte
Copy link
Contributor

Yes I'd be happy to merge this. Will you do one PR per module then?

@jlerbsc
Copy link
Contributor Author

jlerbsc commented May 23, 2024

I don't know yet... Above all, I'm going to try to have a stable situation with each PR. It's likely that this will lead me to do one RP per module.

@jlerbsc
Copy link
Contributor Author

jlerbsc commented Jun 12, 2024

I suggest you do one PR per module. What do you think?

@jlerbsc
Copy link
Contributor Author

jlerbsc commented Jun 12, 2024

This last PR solves other issues of the same type in the core module and dependencies.
The core module no longer contains issues of this type, except in cases where implementation-specific methods have been used.

@josemduarte josemduarte merged commit 62b0426 into biojava:master Jun 17, 2024
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