diff --git a/.gitattributes b/.gitattributes index 00a7b00c9..ee0f759ba 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ .git_archival.txt export-subst +* text=auto eol=lf diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d7e3e744..a24292376 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,13 +16,16 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: matrix: python-version: ['3.12'] + platform: [ubuntu-latest, windows-latest] + + runs-on: ${{ matrix.platform }} + steps: - uses: actions/checkout@v4 + - name: Install uv uses: astral-sh/setup-uv@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 665b95adc..0968c0ee4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,11 @@ repos: - id: text-unicode-replacement-char - id: rst-backticks + - repo: https://github.com/AleksaC/hadolint-py + rev: v2.12.1b3 + hooks: + - id: hadolint + - repo: local hooks: - id: custom-linters @@ -70,8 +75,9 @@ repos: - id: shellcheck-docs name: shellcheck-docs + # We exclude SC2215 as it is a false positive for an unknown reason on Windows. entry: uv run --extra=dev doccmd --language=shell --language=console --command="shellcheck - --shell=bash --exclude=SC1017" + --shell=bash --exclude=SC1017 --exclude=SC2215" language: python types_or: [markdown, rst] additional_dependencies: [uv] @@ -186,17 +192,6 @@ repos: stages: [manual] types_or: [markdown, rst, python, toml] - - id: hadolint-docker - name: Lint Dockerfiles - description: Runs hadolint Docker image to lint Dockerfiles - language: docker_image - types_or: [dockerfile] - stages: [manual] # Requires Docker to be running - # We choose not to use a Python wrapper or alternative to hadolint as none - # appear to be well maintained, and they require more setup than we would - # want. - entry: ghcr.io/hadolint/hadolint hadolint - - id: ruff-check-fix name: Ruff check fix entry: uv run --extra=dev -m ruff check --fix diff --git a/pyproject.toml b/pyproject.toml index 1ee0a0786..6cad37348 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ "Environment :: Web Environment", "Framework :: Pytest", "License :: OSI Approved :: MIT License", + "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12",