You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-8Lines changed: 44 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,16 +31,17 @@ recommended that the tools you use in this action be used in-line with your
31
31
editor or IDE and/or as pre-commit hooks. This action just verifies you didn't
32
32
forget to do that.
33
33
34
-
However, you could choose to have fixes applied by each tool. If you do, it's
35
-
recommended that the autoformatters come first, followed by the style checking
36
-
tools to verify the autoformatter results. After this, the type checkers and
37
-
linters can be run.
38
-
39
34
All tools are enabled by default with the exception of black and yapf. It's
40
35
certainly your prerogative to use as many autoformatters as you'd like, but I
41
36
recommend using only one. Which you choose should be enabled with the
42
37
use-black or use-yapf input.
43
38
39
+
Each run of the action creates a virtual environment. Each of the enabled
40
+
tools is installed in this virtual environment before that tool is executed.
41
+
The default name of the virtual environment is ```python-lint-plus```, but you
42
+
can set it to whatever you'd like with the ```virtual-env``` option.
43
+
This can be helpful if your running a matrix of various versions of python.
44
+
44
45
## Usage
45
46
46
47
See [action.yml](action.yml)
@@ -61,21 +62,37 @@ steps:
61
62
- uses: weibullguy/python-lint-plus@master
62
63
with:
63
64
python-root-list: "tests"
65
+
virtual-env: "python-lint-plus"
64
66
use-black: false
67
+
black-version:
65
68
use-yapf: false
69
+
yapf-version:
66
70
use-isort: false
71
+
isort-version:
67
72
use-docformatter: false
73
+
docformatter-version:
68
74
use-pycodestyle: false
75
+
pycodestyle-version:
69
76
use-autopep8: false
77
+
autopep8-version:
70
78
use-pydocstyle: false
79
+
pydocstyle-version:
71
80
use-mypy: false
81
+
mypy-version:
72
82
use-pylint: false
83
+
pylint-version:
73
84
use-flake8: false
85
+
flake8-version:
74
86
use-mccabe: false
87
+
mccabe-version:
75
88
use-radon: false
89
+
radon-version:
76
90
use-rstcheck: false
91
+
rstcheck-version:
77
92
use-check-manifest: false
93
+
check-manifest-version:
78
94
use-pyroma: false
95
+
pyroma-version:
79
96
extra-black-options: ""
80
97
extra-yapf-options: ""
81
98
extra-isort-options: ""
@@ -136,17 +153,36 @@ steps:
136
153
- uses: actions/checkout@v2
137
154
- uses: weibullguy/python-lint-plus@master
138
155
with:
139
-
python-root-list: "python_alelo tests"
156
+
python-root-list: "tests"
157
+
virtual-environment: "python-lint-plus"
140
158
use-radon: true
141
159
extra-radon-options: "cc -s"
142
160
```
143
161
144
162
To run multiple radon checks, you'll need to add a step for each in your
145
163
workflow file.
146
164
147
-
## Versions used
165
+
## Tool Versions Used
148
166
149
-
To identify the version used you must consult the [CHANGELOG.md](https://github.com/weibullguy/python-lint-image/blob/master/CHANGELOG.md) of the image used in the [Dockerfile](Dockerfile).
167
+
If the version input is left unset, the action will use the latest version of
168
+
the tool available on PyPi. In the following example action.yml, the
169
+
docformatter version used will be 1.5.0, the isort version used will be the
170
+
latest available on PyPi, and the pydocstyle version used will be the latest
171
+
available on PyPi with a version number greater than or equal to 6.1.0.
0 commit comments