Skip to content
Snippets Groups Projects
Unverified Commit 2cf937eb authored by Andrew Newdigate's avatar Andrew Newdigate
Browse files

chore: improve pre-commit configuration

Improves the pre-commit configuration to be more inline with new
standard curated configuration.
parent 4387aabe
No related branches found
No related tags found
No related merge requests found
Pipeline #23060778 passed
Loading
Loading
@@ -21,32 +21,13 @@ repos:
args: [--branch, main]
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.4.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
- repo: https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks
rev: v2.28.0 # renovate:managed:self
hooks:
- id: shellcheck
- id: shfmt
- id: update-asdf-version-variables
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
args: [-c=.yamllint.yaml]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: '2.7.3'
rev: v2.30.0 # renovate:managed:self
hooks:
- id: editorconfig-checker
alias: ec
- id: shellcheck # Run shellcheck for changed Shell files
- id: shfmt # Run shellcheck for changed Shell files
- id: update-asdf-version-variables # Update .gitlab-ci-asdf-versions.yml if .tool-versions has changed
- id: gitlint # Checks your git commit messages for style
- id: gitleaks # Detect hardcoded secrets using Gitleaks
- id: editorconfig # Validate text files against .editorconfig
Loading
Loading
@@ -51,7 +51,7 @@ For example, the `go-*` hooks can be removed for non-Golang projects.
repos:
# pre-commit tasks from common-ci-tasks
- repo: https://gitlab.com/gitlab-com/gl-infra/common-ci-tasks
rev: v2.25.0 # renovate:managed
rev: v2.29.0 # renovate:managed
hooks:
- id: go-fmt # Run gofmt for changed Go files
- id: go-imports # Run go-imports for changed Go files
Loading
Loading
Loading
Loading
@@ -9,7 +9,9 @@ IFS=$'\n\t'
next_version=$1
 
inline_sed() {
if [[ $OSTYPE == 'darwin'* ]]; then
if command -v gsed >/dev/null; then
gsed -i "$@"
elif [[ $OSTYPE == 'darwin'* ]]; then
sed -i '' "$@"
else
sed -i "$@"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment