Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/pylint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ jobs:
pip install -r requirements-test.txt

- name: Analysing the code with pylint
run: |
pylint -d R0915 -d R1702 -d R0913 -d R0914 -d C0103 -d R0912 -d R0911 -d R0917 -d E0102 $(git ls-files '*/*.py' '*.py')
run: make pylint
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.PHONY: help lint fix-lint
.PHONY: fix-lint help pylint test

help:
@echo "Available targets:"
@echo " lint - Run YAML linting to check for issues"
@echo " fmt - Automatically fix common YAML linting issues"
@echo " help - Show this help message"
@echo " test - Run unit tests"
@echo " pylint - Run pylint on production (non-test) python code"

.DEFAULT_GOAL := help
lint:
Expand All @@ -16,3 +18,10 @@ fmt:
@echo "Adding missing newlines at end of files..."
@yamllint --list-files config 2>/dev/null | xargs -I {} sh -c 'if [ -s "{}" ] && [ "$$(tail -c 1 "{}" | wc -l)" -eq 0 ]; then echo "" >> "{}"; fi'
@echo "Auto-fix complete! Run 'make lint' to check for remaining issues."

test:
python -m pytest orion/tests/ -v

pylint:
pylint -d R0915 -d R1702 -d R0913 -d R0914 -d C0103 -d R0912 -d R0911 -d R0917 -d E0102 \
$$(git ls-files '*/*.py' '*.py' | grep -v '/tests/')
Loading
Loading