Skip to content

Commit

Permalink
Trac #33096: src/tox.ini (relint): Exclude editor temp files etc.
Browse files Browse the repository at this point in the history
In unclean source trees, in particular when `configure --enable-
editable` is in use, this speeds up `tox -e relint`.

URL: https://trac.sagemath.org/33096
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Samuel Lelièvre
  • Loading branch information
Release Manager committed Feb 12, 2022
2 parents a0d0888 + 4efced8 commit 73dd8d1
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions src/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,52 @@ description =
# The patterns are in .relint.yml
deps = relint
whitelist_externals = find
commands = find {posargs:{toxinidir}/sage/} -exec relint -c {toxinidir}/.relint.yml \{\} +
commands = find {posargs:{toxinidir}/sage/} \
-name "*#*" -prune -o \
-name "*.a" -prune -o \
-name "*.bak" -prune -o \
-name "*.bz2" -prune -o \
-name "*.dia" -prune -o \
-name "*.gz" -prune -o \
-name "*.ico" -prune -o \
-name "*.inv" -prune -o \
-name "*.JPEG" -prune -o \
-name "*.jpeg" -prune -o \
-name "*.JPG" -prune -o \
-name "*.jpg" -prune -o \
-name "*.log" -prune -o \
-name "*.o" -prune -o \
-name "*.orig" -prune -o \
-name "*.PDF" -prune -o \
-name "*.pdf" -prune -o \
-name "*.PNG" -prune -o \
-name "*.png" -prune -o \
-name "*.pyc" -prune -o \
-name "*.so" -prune -o \
-name "*.sobj" -prune -o \
-name "*.sws" -prune -o \
-name "*.tar" -prune -o \
-name "*.tgz" -prune -o \
-name "*.xz" -prune -o \
-name "*.zip" -prune -o \
-name "*~*" -prune -o \
-name ".DS_Store" -prune -o \
-exec relint -c {toxinidir}/.relint.yml \{\} +
[testenv:codespell]
description =
check for misspelled words in source code
# https://pypi.org/project/codespell/
deps = codespell
commands = codespell \
--skip="*.png,*.jpg,*.JPG,*.inv,*.dia,*.pdf,*.ico,*#*,*~*,*.bak,*.orig,*.log,*.sobj,*.tar,*.gz,*.pyc,*.o,*.sws,*.so,*.a,.DS_Store" \
--skip="doc/ca,doc/de,doc/es,doc/hu,doc/ja,doc/ru,doc/fr,doc/it,doc/pt,doc/tr" \
--skip="src/doc/ca,src/doc/de,src/doc/es,src/doc/hu,src/doc/ja,src/doc/ru,src/doc/fr,src/doc/it,src/doc/pt,src/doc/tr" \
--skip=".git,.tox,worktree*,dist,upstream,logs,local,cythonized,scripts-3,autom4te.cache,tmp,lib.*,*.egg-info" \
--skip="*#*,*.a,*.bak,*.bz2,*.dia,*.gz,*.ico,*.inv,*.JPEG,*.jpeg" \
--skip="*.JPG,*.jpg,*.log,*.o,*.orig,*.PDF,*.pdf,*.PNG,*.png,*.pyc" \
--skip="*.so,*.sobj,*.sws,*.tar,*.tgz,*.xz,*.zip,*~*,.DS_Store" \
--skip="doc/ca,doc/de,doc/es,doc/fr,doc/hu,doc/it,doc/ja,doc/pt,doc/ru,doc/tr" \
--skip="src/doc/ca,src/doc/de,src/doc/es,src/doc/fr,src/doc/hu" \
--skip="src/doc/it,src/doc/ja,src/doc/pt,src/doc/ru,src/doc/tr" \
--skip=".git,.tox,autom4te.cache,cythonized,dist,lib.*,local" \
--skip="logs,scripts-3,tmp,upstream,worktree*,*.egg-info" \
--dictionary=- \
--dictionary={toxinidir}/.codespell-dictionary.txt \
--ignore-words={toxinidir}/.codespell-ignore.txt \
Expand Down

0 comments on commit 73dd8d1

Please sign in to comment.