Merge pull request #12 from negz/one-lint

Use a single lint command
This commit is contained in:
Nic Cope 2023-11-21 00:46:06 -08:00 committed by GitHub
commit 07a7b82847
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 9 deletions

View File

@ -32,9 +32,7 @@ jobs:
run: pipx install hatch==1.7.0 run: pipx install hatch==1.7.0
- name: Lint - name: Lint
run: | run: hatch run lint:check
hatch run lint:check-format
hatch run lint:check
unit-test: unit-test:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@ -77,4 +75,4 @@ jobs:
name: module name: module
path: "dist/*" path: "dist/*"
if-no-files-found: error if-no-files-found: error
retention-days: 1 retention-days: 1

View File

@ -29,14 +29,13 @@ Some useful commands:
# Generate gRPC stubs. # Generate gRPC stubs.
hatch run generate:protoc hatch run generate:protoc
# Lint the code, using ruff. # Lint the code.
hatch run lint:check hatch run lint:check
hatch run lint:check-format
# Run unit tests. # Run unit tests.
hatch run test:unit hatch run test:unit
# Build an sdist and wheel # Build an sdist and wheel.
hatch build hatch build
``` ```

View File

@ -53,8 +53,7 @@ path = ".venv-lint"
dependencies = ["ruff==0.1.6"] dependencies = ["ruff==0.1.6"]
[tool.hatch.envs.lint.scripts] [tool.hatch.envs.lint.scripts]
check = "ruff check crossplane tests" check = "ruff check crossplane tests && ruff format --diff crossplane tests"
check-format = "ruff format --diff crossplane tests"
[tool.hatch.envs.test] [tool.hatch.envs.test]
type = "virtual" type = "virtual"