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

Tidy up Java #951

Merged
merged 9 commits into from
Oct 17, 2019
Merged

Tidy up Java #951

merged 9 commits into from
Oct 17, 2019

Conversation

adriangonz
Copy link
Contributor

Fixes #937.

Changes

  • Run tidy on pom.xml.
  • Add checkstyle linter to mvn validate which will flag violations of Google's Java style guide.
  • Add -Xlint:all flag to mvn compile, which will flag usage of features marked as deprecated.
  • Remove some dependencies which were flagged as unused by mvn dependency:analyze.
  • Add pre-commit config to manage local Git hooks. There is currently a single hook configured which will run google-java-format on modified *.java files on each commit.
  • Run google-java-format across all *.java files to make style consistent.
  • Add note to CONTRIBUTING.md about pre-commit and Google's Java style guide.

Notes

pre-commit is a cross-language tool to handle Git hooks. We can also use it to handle python or go formatters. For python, black already offers integration out of the box and therefore could also be interesting for #947.

@adriangonz adriangonz self-assigned this Oct 14, 2019
@adriangonz
Copy link
Contributor Author

/cc @axsaucedo @cliveseldon

@adriangonz
Copy link
Contributor Author

/cc @ryandawsonuk

@adriangonz
Copy link
Contributor Author

/uncc @jklaise

@seldondev seldondev removed the request for review from jklaise October 14, 2019 16:05
@axsaucedo
Copy link
Contributor

Awesome! Nice one @adriangonz !

@axsaucedo
Copy link
Contributor

Are we going for 2 spaces?

@adriangonz
Copy link
Contributor Author

@axsaucedo I'm just going with whatever google-java-format wants to do. I don't have much mileage with Java, that's what I went for a very opinionated formatter.

Google seems to like 2 spaces.

@axsaucedo
Copy link
Contributor

Fair enough! I think on this one @gsunner and @cliveseldon wouuld be the main Java ones, so if they are happy then let's press the button!

@ukclivecox
Copy link
Contributor

/approve

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cliveseldon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@seldondev
Copy link
Collaborator

failed to trigger Pull Request pipeline

  • failed to create agent
  • failed to calculate in repo config
  • failed to load trigger config for repository SeldonIO/seldon-core for ref be8fa22
  • failed to find any lighthouse configuration files in repo SeldonIO/seldon-core at sha be8fa22
  • failed to process repo SeldonIO/seldon-core refref be8fa22
  • failed to list files in directory /var/tmp/gitrepo660600678/.lighthouse
  • open /var/tmp/gitrepo660600678/.lighthouse
  • no such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tidy up Java project
4 participants