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
+45-31Lines changed: 45 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,46 +1,34 @@
1
1
# Python Linting Action
2
2
3
-
> ℹ️ This is an _unofficial_ tool created by Field Security Services, and is not officially supported by GitHub.
3
+
> [!NOTE]
4
+
> This is an _unofficial_ tool created by Field Security Services, and is not officially supported by GitHub.
4
5
5
6
This Action and Python script lets you run one of several Python linters and type checkers, and upload the results to GitHub's Code Scanning, which is part of [Advanced Security](https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security) (free for open source projects hosted on GitHub).
6
7
7
-
## Supported linters
8
+
## Supported linters and type checkers
8
9
9
-
-[Flake8](https://flake8.pycqa.org/en/latest/)
10
-
-[Pylint](https://www.pylint.org/)
11
-
-[Ruff](https://beta.ruff.rs/)
12
-
-[Mypy](https://mypy.readthedocs.io/en/stable/)
13
-
-[Pytype](https://github.com/google/pytype/) - for Python 3.10 and below
14
-
-[Pyright](https://github.com/microsoft/pyright)
15
-
-[Fixit 2](https://fixit.readthedocs.io/en/stable/) - for Python 3.8 and above
16
-
-[Pyre](https://pyre-check.org/)
10
+
- Linters:
11
+
-[Flake8](https://flake8.pycqa.org/en/latest/)
12
+
-[Pylint](https://www.pylint.org/)
13
+
-[Ruff](https://beta.ruff.rs/)
14
+
-[Fixit 2](https://fixit.readthedocs.io/en/stable/) - for Python 3.8 and above
15
+
- Type checkers:
16
+
-[Mypy](https://mypy.readthedocs.io/en/stable/)
17
+
-[Pytype](https://github.com/google/pytype/) - for Python 3.10 and below
18
+
-[Pyright](https://github.com/microsoft/pyright)
19
+
-[Pyre](https://pyre-check.org/)
17
20
18
21
## Requirements
19
22
20
-
- Python 3.7 or higher
23
+
- Python 3.7 or higher (3.8 or higher for MacOS on GitHub hosted runners)
The linter/type checker can be one or more of `flake8`, `pylint`, `ruff`, `mypy`, `pytype`, `pyright`, `fixit`, `pyre`.
131
+
127
132
## FAQ
128
133
129
-
### Why not use the existing Python linting Actions?
134
+
### Why not use existing Python linting Actions?
130
135
131
136
They don't all produce SARIF, and they don't upload to Code Scanning.
132
137
138
+
### Why not use MegaLinter or Super-linter?
139
+
140
+
They aggregate lots of linters, for a lot of languages, but do not focus on producing output in SARIF, nor on Python.
141
+
142
+
Although MegaLinter has a [SARIF output formatter](https://megalinter.io/latest/reporters/SarifReporter/), only those linters natively able to produce SARIF are usable this way.
143
+
144
+
This Action is specialised for useful linters for Python, and produces SARIF.
145
+
133
146
### Why not create N different Actions?
134
147
135
148
It's far more convenient to have one Action that can run all of the popular linters, so you can configure it once and then run it with different linters.
@@ -180,7 +193,8 @@ See [CODEOWNERS](CODEOWNERS) for the list of maintainers.
180
193
181
194
## Support
182
195
183
-
> ℹ️ This is an _unofficial_ tool created by Field Security Services, and is not officially supported by GitHub.
196
+
> [!NOTE]
197
+
> This is an _unofficial_ tool created by Field Security Services, and is not officially supported by GitHub.
0 commit comments