Skip to content

Commit

Permalink
chore: Updated pre-commit hooks to match java-repo-template
Browse files Browse the repository at this point in the history
Refs: #40
  • Loading branch information
pbezliapovich committed Oct 28, 2024
1 parent 839b1db commit 896deae
Show file tree
Hide file tree
Showing 17 changed files with 31 additions and 21 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: 📄 Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: 🧱 Set up JDK and Maven
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: adopt
java-version: 17
Expand All @@ -29,7 +29,7 @@ jobs:
run: echo "cache_key=${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}" >> $GITHUB_OUTPUT
- name: 💾 Prepare Cache
id: prepare-cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: |
/home/runner/.m2
Expand Down Expand Up @@ -95,13 +95,13 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: 🧱 Set up JDK and Maven
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
with:
distribution: adopt
java-version: 17
- name: 💾 Restore Cache
id: restore-cache
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: |
/home/runner/.m2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
name: Check commit messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
cache: pip # caching pip dependencies
- run: pip install commitizen
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: release-please
id: release
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
with:
release-type: maven
target-branch: main
2 changes: 1 addition & 1 deletion .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-xml
- id: check-json
- id: check-yaml
- id: no-commit-to-branch
- id: mixed-line-ending
- id: end-of-file-fixer
- repo: local
hooks:
- id: sensitive-data-leak-urls
name: Sensitive data leak - URLs
entry: (?<!polarion-opensource@)(?<!www\.)sbb\.ch
language: pygrep
types: [text]
- id: sensitive-data-leak-ue-numbers
name: Sensitive data leak - UE numbers
entry: \b([uUeE]{1,2})\d{5,6}\b
language: pygrep
types: [text]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.21.1
hooks:
Expand Down
2 changes: 1 addition & 1 deletion .yamlfix.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
allow_duplicate_keys = false
line_length = 180
sequence_style = "flow_style"
sequence_style = "flow_style"
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,3 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* All API methods **must be documented**.
* Also see [CODING_STANDARDS.md](./CODING_STANDARDS.md)

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ protected void doPost(final HttpServletRequest req, final HttpServletResponse re
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ Require-Bundle: com.polarion.alm.tracker,
com.polarion.portal.tomcat,
com.polarion.platform.guice,
ch.sbb.polarion.extension.interceptor-manager

Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
contextRoot="webapp">
</webapp>
</extension>
</plugin>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<body>
<h1>Delete non-resolved module comments</h1>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public void stop(BundleContext context) {

logger.info("Action hook service have been unregistered.");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ protected void doGet(final HttpServletRequest req, final HttpServletResponse res
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ Require-Bundle: com.polarion.alm.tracker,
com.polarion.portal.tomcat,
ch.sbb.polarion.extension.interceptor-manager
Import-Package: org.osgi.framework

Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
contextRoot="webapp">
</webapp>
</extension>
</plugin>
</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<body>
<h1>Delete non-resolved module comments</h1>
</body>
</html>
</html>

0 comments on commit 896deae

Please sign in to comment.