Skip to content

Commit 7873194

Browse files
committed
Add some convenience tweaks for developing with emacs.
Make flake8 use pylint format if run in an emacs compile buffer. This causes error messages to be formatted such that "C-x `" (next-error) will go to the flagged line of code. Add emacs backup files to .gitignore. Signed-off-by: John Wiele <[email protected]>
1 parent 17c2a46 commit 7873194

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ uv.lock
2626
# pixi environments
2727
.pixi/*
2828
!.pixi/config.toml
29+
*~
30+
\#*#

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,17 @@ docs-manpages:
111111
docsite-docs:
112112
$(MAKE) -C docsite convert
113113

114+
ifeq (compile,$(findstring compile,$(INSIDE_EMACS)))
115+
FLAKE8_ARGS=--format=pylint
116+
endif
117+
114118
.PHONY: lint
115119
lint:
116120
ifneq (,$(wildcard /usr/bin/python3))
117121
/usr/bin/python3 -m compileall -q -x '\.venv' .
118122
endif
119123
! grep -ri $(EXCLUDE_OPTS) "#\!/usr/bin/python3" .
120-
flake8 $(PROJECT_DIR) $(PYTHON_SCRIPTS)
124+
flake8 $(FLAKE8_ARGS) $(PROJECT_DIR) $(PYTHON_SCRIPTS)
121125
shellcheck *.sh */*.sh */*/*.sh
122126

123127
.PHONY: check-format

0 commit comments

Comments
 (0)