Skip to content
Snippets Groups Projects
Unverified Commit 7bc1bea4 authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #1826 from OpenTechFund/chore/tidy-makefile-for-isort

Centralise linting commands in the makefile
parents 08398df2 9d0ae152
No related branches found
No related tags found
No related merge requests found
.PHONY: .PHONY: help
help: help:
@echo "Usage:" @echo "Usage:"
@echo " make help prints this help." @echo " make help prints this help."
@echo " make fix fix import sort order." @echo " make lint run all python linting."
@echo " make sort run the linter." @echo " make sort run the isort import linter."
@echo " make sort-fix fix import sort order."
@echo " make style run the python code style linter."
.PHONY: fix .PHONY: lint
fix: lint: sort style
isort -y
.PHONY: sort .PHONY: sort
sort: sort:
@echo "Running Isort" && isort --check-only --diff || exit 1 @echo "Checking imports with isort" && isort --check-only --diff
.PHONY: sort-fix
sort-fix:
@echo "Fixing imports with isort" && isort --apply
.PHONY: style
style:
@echo "Checking code style with flake8" && flake8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment