https://github.com/orcid/pre-commit-spotless
pre-commit-spotless
https://github.com/orcid/pre-commit-spotless
Last synced: 9 months ago
JSON representation
pre-commit-spotless
- Host: GitHub
- URL: https://github.com/orcid/pre-commit-spotless
- Owner: ORCID
- Created: 2023-06-12T09:59:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-12T11:03:32.000Z (about 3 years ago)
- Last Synced: 2025-06-05T05:46:43.285Z (about 1 year ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pre-commit-spotless
pre-commit hook for https://pre-commit.com/ to run spotless via maven (https://github.com/diffplug/spotless/tree/main/plugin-maven)
## usage
In your .pre-commit-config.yaml in your project use:-
```
...
- repo: https://github.com/ORCID/pre-commit-spotless
rev: v1.0.0
hooks:
- id: spotless-check
#types_or: [java, xml]
types_or: [xml]
- id: spotless-apply
#types_or: [java, xml]
types_or: [xml]
...
```
and include a spotless.xml pom file to configure spotless. See spotless.xml.example
## dependencies
mvn and java need to be installed. Asdf can be used for this. See .tool-versions for an example config