Skip to content

Commit 1bd4692

Browse files
authored
chore: install linters in make env, exclude *.txt from the license check (#412)
1 parent e78d0cf commit 1bd4692

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/CI.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ jobs:
4747
with:
4848
python-version: "3.11"
4949
- name: Lint codes
50-
run: |
51-
make poetry
52-
poetry install --all-extras --with lint
53-
make gen
54-
make lint
50+
run: make env lint
5551

5652
# Check if the plugin doc is generated correctly
5753
plugin-doc-check:

.licenserc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ header:
3232
- '**/*.json'
3333
- '.venv'
3434
- 'poetry.lock'
35+
- '**/*.txt'
3536

3637
comment: on-failure

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ env: poetry gen
3030
poetry install --all-extras
3131
poetry run pip install --upgrade pip
3232

33+
# The lint group is kept out of `env` on purpose: `unify` (and its `untokenize`
34+
# dependency) are unmaintained and their sdists fail to build on Python >= 3.12,
35+
# so installing them would break `make env` on the newer interpreters.
36+
.PHONY: env-lint
37+
env-lint:
38+
poetry install --only lint
39+
3340
.PHONY: poetry poetry-fallback
3441
# poetry installer may not work on macOS's default python
3542
# falls back to pipx installer
@@ -69,13 +76,13 @@ install: gen-basic
6976

7077
.PHONY: lint
7178
# flake8 configurations should go to the file setup.cfg
72-
lint: clean
79+
lint: env-lint clean gen
7380
poetry run flake8 .
7481
poetry run pylint --disable=all --enable=E0602,E0603,E1101 skywalking tests
7582

7683
.PHONY: fix
7784
# fix problems described in CodingStyle.md - verify outcome with extra care
78-
fix:
85+
fix: env-lint
7986
poetry run unify -r --in-place .
8087
poetry run flynt -tc -v .
8188

0 commit comments

Comments
 (0)