Repository navigation
61 lines (53 loc) · 1.68 KB
/
Copy pathlint.yml
File metadata and controls
61 lines (53 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Lint checks
on: [push, pull_request, workflow_dispatch]
jobs:
lint_python_versions:
if: github.ref_type == 'branch'
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "2.7"
- "3.8"
- "latest"
include:
- python: "2.7"
image: python:2.7
- python: "3.8"
image: python:3.8
- python: "latest"
image: python:latest
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v3
- name: Show python version
run: |
echo "Using Python from: $(which python)"
python --version
pip install --upgrade pip
- name: Avoid suspicious ownership errors
run: git config --global --add safe.directory /__w/MultiBootSelectorPlugin/MultiBootSelectorPlugin
- name: Install flake8
run: pip install flake8
- name: Run flake8
run: flake8 --verbose --statistics --count --show-source $(git ls-files '*.py')
- name: Install Pylint
run: pip install pylint
- name: Run Pylint
run: pylint --reports=y --output-format=colorized $(git ls-files '*.py')
- name: Install Ruff (only for Python 3.x)
if: matrix.python != '2.7'
run: pip install ruff
- name: Run Ruff
if: matrix.python != '2.7'
run: ruff check --output-format=github --show-files --show-fixes .
lint_shell_scripts:
runs-on: ubuntu-latest
if: github.ref_type == 'branch'
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
env:
SHELLCHECK_OPTS: -e SC2045