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

Adds some static analysis tools to the maven pom file #170

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

ChrisJohnNOAA
Copy link
Contributor

Description

The tools added are ErrorProne, but with all (failing) checks currently disabled. Checks will be enabled over time as the existing problems are fixed.

Auto formatting on a git pre-commit hook using git-code-format-maven-plugin and google-java-format. This will cause changes large changes to files the first time they are touched but will allow maintaining a consistent code style without needing to manually enforce it or configure code formatters in every developers IDE.

Checklist before requesting a review

  • [ X] I have performed a self-review of my code
  • [ X] My code follows the style guidelines of this project
  • [ X] I have commented my code, particularly in hard-to-understand areas
  • [ X] I have made corresponding changes to the documentation
  • [ X] My changes generate no new warnings
  • [ X] I have added tests that prove my fix is effective or that my feature works
  • [ X] New and existing unit tests pass locally with my changes

This is effectively doing nothing for now. The goal is to enable checks overtime as things are fixed.
This adheres to the Google Java style. This is going to cause a lot of code changes as files are touched, but I think it's important to have a technical enforcement of styles.
This was spurred by some of the code having significant issues in the static analysis, but since the code is unused (probably was used with the obsolete browsers), just move to the archive instead of investigating fixes.
Run with `mvn spotbugs:spotbugs`
@ChrisJohnNOAA ChrisJohnNOAA merged commit f50ea54 into ERDDAP:main Jul 15, 2024
@ChrisJohnNOAA ChrisJohnNOAA deleted the staticAnalysis branch July 15, 2024 13:40
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.

1 participant