opendevstack / opendevstack/ods-provisioning-app

install pre-commit hook that formats via spotless

Open
#301 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
14
Forks
20
Avg merge
3h 35m
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.
We use spotlessJavaCheck on travis to verify that code is formatted according to the rules.
Since my IDE does not exactly format in the same way, I have to run gradle spotlessJavaApply manually. Sometimes I do forget to run the formatter.

Describe the solution you'd like
Implement a pre-commit hook that runs gradlew spotlessJavaApply.
Installation of the hook can be easyly automated via gradle, for example https://gist.github.com/KenVanHoeylandt/c7a928426bce83ffab400ab1fd99054a

@michaelsauter @tjaeschke Whats do you think?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the Gradle configuration that defines spotlessJavaCheck and spotlessJavaApply, then review how the repository currently installs or documents development hooks. Implement automated installation of a pre-commit hook that runs gradlew spotlessJavaApply, and verify that the hook formats staged work as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.