diff --git a/src/doc/en/developer/tools.rst b/src/doc/en/developer/tools.rst index e2ac3ef82dd..df87e537679 100644 --- a/src/doc/en/developer/tools.rst +++ b/src/doc/en/developer/tools.rst @@ -59,7 +59,10 @@ available:: pycodestyle-minimal -- check against Sage's minimal style conventions relint -- check whether some forbidden patterns appear (includes all patchbot pattern-exclusion plugins) + rst -- validate Python docstrings markup as reStructuredText codespell -- check for misspelled words in source code + cython-lint -- Check Cython files for code style + pyright -- run the static typing checker pyright pycodestyle -- check against the Python style conventions of PEP8 -p auto -- run test environments in parallel --help -- show tox help @@ -208,6 +211,14 @@ or a few related issues:: *Documentation:* https://pycodestyle.pycqa.org/en/latest/index.html +.. _section-tools-cython-lint: + +Cython-lint +=========== + +`Cython-lint `_ checks Cython source files +for coding style. + .. _section-tools-relint: Relint diff --git a/src/tox.ini b/src/tox.ini index bff0b3bc441..a4ab5c3c40b 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -196,6 +196,12 @@ description = deps = flake8-rst-docstrings commands = flake8 --select=RST {posargs:{toxinidir}/sage/} +[testenv:cython-lint] +description = + Check Cython files for code style +deps = cython-lint +commands = cython-lint --no-pycodestyle {posargs:{toxinidir}/sage/} + [flake8] rst-roles = # Sphinx diff --git a/tox.ini b/tox.ini index 076be2f064b..80b9c18cff5 100644 --- a/tox.ini +++ b/tox.ini @@ -780,3 +780,11 @@ passenv = {[sage_src]passenv} envdir = {[sage_src]envdir} commands = {[sage_src]commands} allowlist_externals = {[sage_src]allowlist_externals} + +[testenv:cython-lint] +description = + Check Cython files for code style +passenv = {[sage_src]passenv} +envdir = {[sage_src]envdir} +commands = {[sage_src]commands} +allowlist_externals = {[sage_src]allowlist_externals}