Skip to content
  • Brian Kroth's avatar
    Enforce and apply Google Java Style formatting (#416) · 56e3191b
    Brian Kroth authored
    Uses [fmt-maven-plugin](https://github.com/spotify/fmt-maven-plugin) to
    automatically (locally) apply [Google Java
    Style](https://google.github.io/styleguide/javaguide.html) formatting
    via the
    [google-java-format](https://github.com/google/google-java-format)
    plugin during `mvn compile` time.
    
    During CI time, it checks for incorrect formatting on files *prior* to
    compile to automatically reject failing commits so that reviewers have
    fewer things to nit over and code style is more standardized.
    - [x] Those file changes are initially omitted in order to validate this
    part and make the PR easier to review. Will commit those once initial
    review is done.
    
    This is not *yet* enforced by a git pre-commit however, so developers
    will have to add the changes that the `compile` stage applied after the
    fact.
    
    Additionally, it adds settings for
    [VSCode](https://code.visualstudio.com/docs/java/java-linting#_applying-formatter-settings)
    to apply these formattings during editing.
    - [ ] Similar settings for Eclipse are currently missing.
    
    Followup PR can also exclude this squashed PR from the `git blame`
    analysis using a [`.git-blame-ignore-revs`
    file](https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view)
    
    Closes #406
    56e3191b
After you've reviewed these contribution guidelines, you'll be all set to contribute to this project.