summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-02-18 18:44:43 +0100
committerGitHub <noreply@github.com>2020-02-18 18:44:43 +0100
commit5e47e0bcba7585909a11e9c7424e864fc26a7fd2 (patch)
treefd808e05f549866b81fbaed527c0226355c02af3 /Makefile
parent41fcba5dd7ecbbc788814c722f31e630422ba28e (diff)
downloadpsutil-5e47e0bcba7585909a11e9c7424e864fc26a7fd2.tar.gz
Add C linter script (#1698)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 4f4d1238..b15aa5d9 100644
--- a/Makefile
+++ b/Makefile
@@ -169,10 +169,17 @@ test-coverage: ## Run test coverage.
# Linters
# ===================================================================
-flake8: ## flake8 linter.
- @git ls-files | grep \\.py$ | xargs $(PYTHON) -m flake8
+lint-py: ## Run Python (flake8) linter.
+ @git ls-files '*.py' | xargs $(PYTHON) -m flake8
-fix-flake8: ## Attempt to automaticall fix some flake8 issues.
+lint-c: ## Run C linter.
+ @git ls-files '*.c' '*.h' | xargs $(PYTHON) scripts/internal/clinter.py
+
+lint: ## Run Python (flake8) and C linters.
+ ${MAKE} lint-py
+ ${MAKE} lint-c
+
+fix-lint: ## Attempt to automatically fix some Python lint issues.
@git ls-files | grep \\.py$ | xargs $(PYTHON) -m flake8 --exit-zero | $(PYTHON) scripts/internal/fix_flake8.py
# ===================================================================