-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce code formatting + git hooks
Adds the spotless gradle plugin for a formatting abstraction; prettier for formatting Java, Java properties, YAML, and Markdown; and pre-commit to tie the aforementioned into a pre-commit hook.
- Loading branch information
1 parent
0b44a67
commit 1c34510
Showing
12 changed files
with
997 additions
and
744 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
name: Continuous Testing | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
permissions: | ||
contents: read | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
- uses: gradle/gradle-build-action@v2 | ||
- run: gradle wrapper | ||
- run: ./gradlew test | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: "11" | ||
distribution: "temurin" | ||
- uses: gradle/gradle-build-action@v2 | ||
- run: gradle wrapper | ||
- run: ./gradlew check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
groovy.formatter.remove.unnecessary.semicolons = true | ||
org.eclipse.jdt.core.formatter.indent_empty_lines = false | ||
org.eclipse.jdt.core.formatter.tabulation.char = space | ||
org.eclipse.jdt.core.formatter.tabulation.size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: spotless | ||
name: spotless | ||
language: system | ||
entry: ./gradlew spotlessApply | ||
pass_filenames: false | ||
always_run: true | ||
- id: git-diff | ||
name: git-diff | ||
language: system | ||
entry: git --no-pager diff --color --exit-code | ||
always_run: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugins: | ||
- prettier-plugin-java | ||
- prettier-plugin-properties | ||
tabWidth: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# CHANGELOG | ||
|
||
**v0.1.0:** | ||
- Initial implementation of [the spec](https://github.com/sqids/sqids-spec) | ||
- Packaging & cleanup | ||
|
||
- Initial implementation of [the spec](https://github.com/sqids/sqids-spec) | ||
- Packaging & cleanup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.