chore: install linters in `make env`, exclude `*.txt` from the license check (#412)
diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml
index 1364acc..37fce06 100644
--- a/.github/workflows/CI.yaml
+++ b/.github/workflows/CI.yaml
@@ -47,11 +47,7 @@
with:
python-version: "3.11"
- name: Lint codes
- run: |
- make poetry
- poetry install --all-extras --with lint
- make gen
- make lint
+ run: make env lint
# Check if the plugin doc is generated correctly
plugin-doc-check:
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 736e4ed..4c2d374 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -32,5 +32,6 @@
- '**/*.json'
- '.venv'
- 'poetry.lock'
+ - '**/*.txt'
comment: on-failure
diff --git a/Makefile b/Makefile
index 29be086..3fae3a5 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,13 @@
poetry install --all-extras
poetry run pip install --upgrade pip
+# The lint group is kept out of `env` on purpose: `unify` (and its `untokenize`
+# dependency) are unmaintained and their sdists fail to build on Python >= 3.12,
+# so installing them would break `make env` on the newer interpreters.
+.PHONY: env-lint
+env-lint:
+ poetry install --only lint
+
.PHONY: poetry poetry-fallback
# poetry installer may not work on macOS's default python
# falls back to pipx installer
@@ -69,13 +76,13 @@
.PHONY: lint
# flake8 configurations should go to the file setup.cfg
-lint: clean
+lint: env-lint clean gen
poetry run flake8 .
poetry run pylint --disable=all --enable=E0602,E0603,E1101 skywalking tests
.PHONY: fix
# fix problems described in CodingStyle.md - verify outcome with extra care
-fix:
+fix: env-lint
poetry run unify -r --in-place .
poetry run flynt -tc -v .