-
Notifications
You must be signed in to change notification settings - Fork 26
39 lines (34 loc) · 1.34 KB
/
lint.yml
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
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
name: Lint (flake8)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install pep8-naming
- name: Lint with flake8
run: flake8 --extend-ignore=F,C,E402 --per-file-ignores='src/python/detectors/pep8_recommendations/pep8_recommendations.py:E714 src/python/detectors/equality_vs_identity/equality_vs_identity.py:E711 src/python/detectors/xpath_injection/xpath_injection.py:N817' --show-source src
- run: echo "This job's status is ${{ job.status }}."