Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Makefile typo, avoid printing long command line #480

Merged
merged 2 commits into from
Dec 21, 2023
Merged
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
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ all:
$(error please pick a target)

# We only want to format and lint checked in python files
CHECKED_IN_PYTHING_FILES := $(shell git ls-files | grep '\.py$$')
CHECKED_IN_PYTHON_FILES := $(shell git ls-files | grep '\.py$$')

FLAKE8_OPTIONS := --max-line-length 120 --extend-ignore E203,W503
BLACK_OPTIONS := --line-length 120
Expand All @@ -26,22 +26,24 @@ ISORT_OPTIONS := --profile black
.PHONY: fmt
fmt:
@echo "Running black fmt..."
python -m black $(BLACK_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
python -m isort $(ISORT_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
@python -m black $(BLACK_OPTIONS) $(CHECKED_IN_PYTHON_FILES)
assaf758 marked this conversation as resolved.
Show resolved Hide resolved
@echo "Running isort..."
@python -m isort $(ISORT_OPTIONS) $(CHECKED_IN_PYTHON_FILES)

.PHONY: lint
lint: flake8 fmt-check

.PHONY: fmt-check
fmt-check:
@echo "Running black+isort fmt check..."
python -m black $(BLACK_OPTIONS) --check --diff $(CHECKED_IN_PYTHING_FILES)
python -m isort --check --diff $(ISORT_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
@echo "Running black check..."
@python -m black $(BLACK_OPTIONS) --check --diff $(CHECKED_IN_PYTHON_FILES)
@echo "Running isort check..."
@python -m isort --check --diff $(ISORT_OPTIONS) $(CHECKED_IN_PYTHON_FILES)

.PHONY: flake8
flake8:
@echo "Running flake8 lint..."
python -m flake8 $(FLAKE8_OPTIONS) $(CHECKED_IN_PYTHING_FILES)
@python -m flake8 $(FLAKE8_OPTIONS) $(CHECKED_IN_PYTHON_FILES)

.PHONY: test
test:
Expand Down