The current test does not match file files in /lib/* because the
-wholename command is missing the preceeding \*. The whole command is
a little difficult to understand.
This re-lays the find command, using -prune to skip dot directories
and keeping a hopefully clearer flow of what is being matched.
Change-Id: Idd856e897ff97095fb116294a9187ff4b198fa26
... | ... |
@@ -10,7 +10,19 @@ install_command = pip install {opts} {packages} |
10 | 10 |
[testenv:bashate] |
11 | 11 |
deps = bashate |
12 | 12 |
whitelist_externals = bash |
13 |
-commands = bash -c "find {toxinidir} -not -wholename \*.tox/\* -and \( -name \*.sh -or -name \*rc -or -name functions\* -or \( -wholename lib/\* -and -not -name \*.md \) \) -print0 | xargs -0 bashate -v" |
|
13 |
+commands = bash -c "find {toxinidir} \ |
|
14 |
+ -not \( -type d -name .?\* -prune \) \ # prune all 'dot' dirs |
|
15 |
+ -not \( -type d -name doc -prune \) \ # skip documentation |
|
16 |
+ -type f \ # only files |
|
17 |
+ -not -name \*~ \ # skip editors, readme, etc |
|
18 |
+ -not -name \*.md \ |
|
19 |
+ \( \ |
|
20 |
+ -name \*.sh -or \ |
|
21 |
+ -name \*rc -or \ |
|
22 |
+ -name functions\* -or \ |
|
23 |
+ -wholename \*/lib/\* \ # /lib files are shell, but |
|
24 |
+ \) \ # have no extension |
|
25 |
+ -print0 | xargs -0 bashate -v" |
|
14 | 26 |
|
15 | 27 |
[testenv:docs] |
16 | 28 |
deps = |