| 1 |
# stylecheck.mk |
| 2 |
# Part of ‘dput’, a Debian package upload toolkit. |
| 3 |
# |
| 4 |
# This is free software, and you are welcome to redistribute it under |
| 5 |
# certain conditions; see the end of this file for copyright |
| 6 |
# information, grant of license, and disclaimer of warranty. |
| 7 |
|
| 8 |
# Makefile rules for static style checks. |
| 9 |
|
| 10 |
MODULE_DIR := $(CURDIR) |
| 11 |
|
| 12 |
PYTHON_PYCODESTYLE ?= $(PYTHON) ${PYTHON_OPTS} -m pycodestyle |
| 13 |
PYTHON_PYCODESTYLE_OPTS ?= |
| 14 |
|
| 15 |
PYTHON_PYDOCSTYLE ?= $(PYTHON) ${PYTHON_OPTS} -m pydocstyle |
| 16 |
PYTHON_PYDOCSTYLE_OPTS ?= |
| 17 |
|
| 18 |
PYTHON_PYLINT ?= $(PYTHON) ${PYTHON_OPTS} -m pylint |
| 19 |
PYTHON_PYLINT_OPTS ?= |
| 20 |
|
| 21 |
|
| 22 |
.PHONY: stylecheck |
| 23 |
stylecheck: stylecheck-pycodestyle |
| 24 |
|
| 25 |
.PHONY: stylecheck-pycodestyle |
| 26 |
stylecheck-pycodestyle: |
| 27 |
$(PYTHON_PYCODESTYLE) ${PYTHON_PYCODESTYLE_OPTS} ${python_modules} |
| 28 |
|
| 29 |
.PHONY: stylecheck-pydocstyle |
| 30 |
stylecheck-pydocstyle: |
| 31 |
$(PYTHON_PYDOCSTYLE) ${PYTHON_PYDOCSTYLE_OPTS} ${python_modules} |
| 32 |
|
| 33 |
.PHONY: stylecheck-pylint |
| 34 |
stylecheck-pylint: |
| 35 |
$(PYTHON_PYLINT) ${PYTHON_PYLINT_OPTS} ${python_modules} |
| 36 |
|
| 37 |
|
| 38 |
# Copyright © 2015–2026 Ben Finney <[email protected]> |
| 39 |
# |
| 40 |
# This is free software: you may copy, modify, and/or distribute this work |
| 41 |
# under the terms of the GNU General Public License as published by the |
| 42 |
# Free Software Foundation; version 3 of that license or any later version. |
| 43 |
# No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details. |
| 44 |
|
| 45 |
|
| 46 |
# Local Variables: |
| 47 |
# coding: utf-8 |
| 48 |
# mode: makefile |
| 49 |
# End: |
| 50 |
# vim: fileencoding=utf-8 filetype=make : |