Gaffer icon indicating copy to clipboard operation
Gaffer copied to clipboard

Improve code analysis CI in Gaffer

Open t92549 opened this issue 1 year ago • 1 comments

https://github.com/gchq/Gaffer/issues/39 added FindBugs to Gaffer. FindBugs is no longer maintained and has been replaced by SpotBugs.

This could be upgraded, or a more modern tool could be used to replace this entirely. For example:

Some of these would also replace the need for other plugins such as checkstyle and code coverage as they handle those too.

t92549 avatar Jul 29 '22 17:07 t92549

Some work has been done on this ticket to identify the best tools going forward, but further work on this ticket is currently on hold. For more information see internal tool- number 301

lb324567 avatar Aug 31 '22 15:08 lb324567

SonarQube is the likely solution to this, but will need checking when this ticket is progressed. For more information see internal tool- number 301

lb324567 avatar Oct 13 '22 08:10 lb324567

#2842 will upgrade our SpotBugs configuration and improve code quality standards. We might want to consider using the PMD source code analyser which also runs as a maven plugin and works well alongside SpotBugs. We could also consider enabling the Google Java style formatting check in the Spotless plugin.

GCHQDeveloper314 avatar Jan 11 '23 13:01 GCHQDeveloper314

#2871 introduces the PMD plugin which performs further static analysis and code quality checks. It also enables GitHub's CodeQL security scanning. This issue can probably be closed once this has been merged.

To an extent these extra checks replace the checkstyle plugin, although they don't replace the code style checks. These could be replaced by the Spotless plugin formatting checks mentioned above, but this would also require major refactors to get the codebase to comply and so it's probably easier to leave this for now.

GCHQDeveloper314 avatar Jan 30 '23 14:01 GCHQDeveloper314

Closed by #2871

GCHQDeveloper314 avatar Feb 08 '23 11:02 GCHQDeveloper314