Skip to content

Commit d3ffc96

Browse files
robertsmiejaAUTOMATIC1111
authored andcommitted
Add basic Pylint to catch syntax errors on PRs
1 parent eef3bc6 commit d3ffc96

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://github.com/actions/starter-workflows/blob/1067f16ad8a1eac328834e4b0ae24f7d206f810d/ci/pylint.yml for original reference file
2+
name: Run Linting/Formatting on Pull Requests
3+
4+
on:
5+
- push
6+
- pull_request
7+
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore for syntax docs
8+
# if you want to filter out branches, delete the `- pull_request` and uncomment these lines :
9+
# pull_request:
10+
# branches:
11+
# - master
12+
# branches-ignore:
13+
# - development
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@v3
21+
- name: Set up Python 3.10
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: 3.10.6
25+
- name: Install PyLint
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install pylint
29+
# This lets PyLint check to see if it can resolve imports
30+
- name: Install dependencies
31+
run : |
32+
export COMMANDLINE_ARGS="--skip-torch-cuda-test --exit"
33+
python launch.py
34+
- name: Analysing the code with pylint
35+
run: |
36+
pylint $(git ls-files '*.py')

.pylintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See https://pylint.pycqa.org/en/latest/user_guide/messages/message_control.html
2+
[MESSAGES CONTROL]
3+
disable=C,R,W,E,I

0 commit comments

Comments
 (0)