Skip to content

Commit

Permalink
standard linting / static analaysis
Browse files Browse the repository at this point in the history
  • Loading branch information
jamie zieziula committed Oct 8, 2024
1 parent 76e0a7c commit 5950f9e
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 13 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Static analysis

"on":
pull_request: {}

permissions: {}

jobs:
pre_commit_checks:
name: pre-commit checks
runs-on: ubuntu-latest
permissions:
# required to read from the repo
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install tool dependencies
uses: jdx/mise-action@v2

- name: Run pre-commit
run: |
pre-commit run --show-diff-on-failure --color=always --all-files
6 changes: 1 addition & 5 deletions .github/workflows/validate-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
name: Validate Changes to Workflow

"on":
pull_request:
branches:
- main
pull_request: {}

permissions: {}

Expand All @@ -23,5 +21,3 @@ jobs:
with:
manifest-path: .github/updatecli/manifest.yaml
run-type: minor


8 changes: 0 additions & 8 deletions .github/yaml-lint/.config.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[tools]
actionlint = '1.7.1'
pre-commit = '3.8.0'
shellcheck = '0.10.0'
yamllint = '1.35.1'
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
- id: detect-private-key
- id: no-commit-to-branch
- id: trailing-whitespace

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.28.0
hooks:
- id: yamllint
args:
- --strict

- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
hooks:
- id: actionlint
args:
- -shellcheck=

- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.7.2
hooks:
- id: shellcheck
args: ["--severity=error"]
12 changes: 12 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
extends: default

ignore: |
deploy/charts/

rules:
comments:
min-spaces-from-content: 1
comments-indentation: disable
document-start: disable
line-length: disable

0 comments on commit 5950f9e

Please sign in to comment.