From 71ff58cc4f505564c4222b42912bae557162b088 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Tue, 4 Mar 2025 18:49:54 +0200 Subject: [PATCH] Check config.ini is sorted with GitHub Actions --- .github/workflows/lint.yml | 22 ++++++++++++++++++++++ .pre-commit-config.yaml | 9 +++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..e25d314 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,22 @@ +name: Lint + +on: [push, pull_request, workflow_dispatch] + +permissions: {} + +env: + FORCE_COLOR: 1 + RUFF_OUTPUT_FORMAT: github + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + - uses: tox-dev/action-pre-commit-uv@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..bf03426 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +repos: + - repo: local + hooks: + - id: sort-ini + name: Sort config.ini + entry: python3 config/sort-ini.py config/config.ini + language: python + pass_filenames: false + files: ^config/config.ini$