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
- name: Lint
run: |
hatch run lint:check-format
hatch run lint:check
run: hatch run lint:check
unit-test:
runs-on: ubuntu-22.04
@ -77,4 +75,4 @@ jobs:
name: module
path: "dist/*"
if-no-files-found: error
retention-days: 1
retention-days: 1

View File

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

View File

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