22
33# Parameters
44#
5- # $1 - python-root-list
6- # $2 - use-pylint
7- # $3 - use-pycodestyle
8- # $4 - use-flake8
9- # $5 - use-black
10- # $6 - use-mypy
11- # $7 - use-isort
12- # $8 - use-vulture
5+ # $1 - use-pylint
6+ # $2 - use-pycodestyle
7+ # $3 - use-flake8
8+ # $4 - use-black
9+ # $5 - use-mypy
10+ # $6 - use-isort
11+ # $7 - use-vulture
12+ # $8 - use-pydocstyle
1313# $9 - extra-pylint-options
14- # $10 - extra-pydocstyle -options
15- # ${11} - extra-pycodestyle -options
16- # ${12} - extra-flake8 -options
17- # ${13} - extra-black -options
18- # ${14} - extra-mypy -options
19- # ${15} - extra-isort -options
20- # ${16} - extra-vulture -options
21- # ${17} - extra-pydocstyle-options
22-
23- echo python-root-list: $1
24- echo use-pylint: $2
25- echo use-pycodestyle: $3
26- echo use-flake8: $4
27- echo use-black: $5
28- echo use-mypy: $6
29- echo use-isort: $7
30- echo use-vulture: $8
14+ # $10 - extra-pycodestyle -options
15+ # $11 - extra-flake8 -options
16+ # $12 - extra-black -options
17+ # $13 - extra-mypy -options
18+ # $14 - extra-isort -options
19+ # $15 - extra-vulture -options
20+ # $16 - extra-pydocstyle -options
21+ # $@ - python-root-list
22+
23+ echo use-pylint: $1
24+ echo use-pycodestyle: $2
25+ echo use-flake8: $3
26+ echo use-black: $4
27+ echo use-mypy: $5
28+ echo use-isort: $6
29+ echo use-vulture: $7
30+ echo use-pydocstyle: $8
3131echo extra-pylint-options: $9
32- echo extra-pydocstyle-options: $1 0
33- echo extra-pycodestyle-options: $1 1
34- echo extra-flake8-options: $1 2
35- echo extra-black-options: $1 3
36- echo extra-mypy-options: $1 4
37- echo extra-isort-options: $1 5
38- echo extra-vulture-options: $1 6
39- echo extra-pydocstyle-options: $1 7
32+ echo extra-pycodestyle-options: $1 0
33+ echo extra-flake8-options: $1 1
34+ echo extra-black-options: $1 2
35+ echo extra-mypy-options: $1 3
36+ echo extra-isort-options: $1 4
37+ echo extra-vulture-options: $1 5
38+ echo extra-pydocstyle-options: $1 6
39+ # rename command line arguments so tha last argument receives what is remaining
40+ # change this number if more lintners are added
41+ shift 16
42+ echo python-root-list: $@
4043
4144# actions path has the copy of this actions repo
4245for matcher in $GITHUB_ACTION_PATH /matchers/* .json
4750echo " TERM: changing from $TERM -> xterm"
4851export TERM=xterm
4952
50- if [ " $2 " = true ] ; then
53+ if [ " $1 " = true ] ; then
5154
52- echo Running: pylint $9 $1
55+ echo Running: pylint $8 $@
5356
54- $CONDA /bin/pylint --output-format=" colorized" $9 $1
57+ $CONDA /bin/pylint --output-format=" colorized" $8 $@
5558 exit_code=$?
5659
5760 if [ " $exit_code " = " 0" ]; then
@@ -63,11 +66,11 @@ if [ "$2" = true ] ; then
6366fi
6467
6568
66- if [ " $3 " = true ] ; then
69+ if [ " $2 " = true ] ; then
6770
68- echo Running: pycodestyle ${11 } $1
71+ echo Running: pycodestyle ${10 } $@
6972
70- $CONDA /bin/pycodestyle ${11 } $1
73+ $CONDA /bin/pycodestyle ${10 } $@
7174 exit_code=$?
7275
7376 if [ " $exit_code " = " 0" ]; then
@@ -78,11 +81,11 @@ if [ "$3" = true ] ; then
7881
7982fi
8083
81- if [ " $4 " = true ] ; then
84+ if [ " $3 " = true ] ; then
8285
83- echo Running: flake8 ${12 } $1
86+ echo Running: flake8 ${11 } $@
8487
85- $CONDA /bin/flake8 ${12 } $1
88+ $CONDA /bin/flake8 ${11 } $@
8689 exit_code=$?
8790
8891 if [ " $exit_code " = " 0" ]; then
@@ -93,11 +96,11 @@ if [ "$4" = true ] ; then
9396
9497fi
9598
96- if [ " $5 " = true ] ; then
99+ if [ " $4 " = true ] ; then
97100
98- echo Running: black --check ${13 } $1
101+ echo Running: black --check ${12 } $@
99102
100- $CONDA /bin/black --check ${13 } $1
103+ $CONDA /bin/black --check ${12 } $@
101104 exit_code=$?
102105
103106 if [ " $exit_code " = " 0" ]; then
@@ -108,11 +111,11 @@ if [ "$5" = true ] ; then
108111
109112fi
110113
111- if [ " $6 " = true ] ; then
114+ if [ " $5 " = true ] ; then
112115
113- echo Running: mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ${14 } $1
116+ echo Running: mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ${13 } $@
114117
115- $CONDA /bin/mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ${14 } $1
118+ $CONDA /bin/mypy --ignore-missing-imports --follow-imports=silent --show-column-numbers ${13 } $@
116119 exit_code=$?
117120
118121 if [ " $exit_code " = " 0" ]; then
@@ -123,11 +126,11 @@ if [ "$6" = true ] ; then
123126
124127fi
125128
126- if [ " $7 " = true ] ; then
129+ if [ " $6 " = true ] ; then
127130
128- echo Running: isort ${15 } $1 -c --diff
131+ echo Running: isort ${14 } $@ -c --diff
129132
130- $CONDA /bin/isort ${15 } $1 -c --diff
133+ $CONDA /bin/isort ${14 } $@ -c --diff
131134 exit_code=$?
132135
133136 if [ " $exit_code " = " 0" ]; then
@@ -138,11 +141,11 @@ if [ "$7" = true ] ; then
138141
139142fi
140143
141- if [ " $8 " = true ] ; then
144+ if [ " $7 " = true ] ; then
142145
143- echo Running: vulture ${16 } $1
146+ echo Running: vulture ${15 } $@
144147
145- $CONDA /bin/vulture ${16 } $1
148+ $CONDA /bin/vulture ${15 } $@
146149 exit_code=$?
147150
148151 if [ " $exit_code " = " 0" ]; then
@@ -153,11 +156,11 @@ if [ "$8" = true ] ; then
153156
154157fi
155158
156- if [ " $9 " = true ] ; then
159+ if [ " $8 " = true ] ; then
157160
158- echo Running: pydocstyle ${17 } $1
161+ echo Running: pydocstyle ${16 } $@
159162
160- $CONDA /bin/pydocstyle ${17 } $1
163+ $CONDA /bin/pydocstyle ${16 } $@
161164 exit_code=$?
162165
163166 if [ " $exit_code " = " 0" ]; then
0 commit comments