Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
src/tox.ini: Add cython-lint
  • Loading branch information
Matthias Koeppe committed Mar 29, 2023
commit 6b1ce2a1ff24b7bbd810f8231c11b67058599cc3
10 changes: 10 additions & 0 deletions src/doc/en/developer/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -208,6 +211,13 @@ or a few related issues::
*Documentation:* https://pycodestyle.pycqa.org/en/latest/index.html


.. _section-tools-cython-lint:
Cython-lint
===========

`Cython-lint <https://pypi.org/project/cython-lint/>`_ checks Cython source files
for coding style.

.. _section-tools-relint:

Relint
Expand Down
8 changes: 7 additions & 1 deletion src/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
## in a virtual environment.
##
[tox]
envlist = doctest, coverage, startuptime, pycodestyle-minimal, relint, codespell, rst
envlist = doctest, coverage, startuptime, pycodestyle-minimal, relint, codespell, rst, cython-lint
# When adding environments above, also update the delegations in SAGE_ROOT/tox.ini
skipsdist = true

Expand Down Expand Up @@ -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
Expand Down