From cce3162910f3abcb3f8b0ae16ece7c51d80ed29e Mon Sep 17 00:00:00 2001 From: Rohit Dasgupta Date: Tue, 22 Oct 2024 16:37:04 -0500 Subject: [PATCH 1/3] Create pylint.yml Add a linter to run on push --- .github/workflows/pylint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..c73e032 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,23 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') From 021dd5242db5c97b9e021ba5f0e6f45572ed4e14 Mon Sep 17 00:00:00 2001 From: Rohit Dasgupta Date: Tue, 22 Oct 2024 16:43:53 -0500 Subject: [PATCH 2/3] Add autopep8 lint action --- .github/workflows/pylint.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index c73e032..7181759 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -18,6 +18,13 @@ jobs: run: | python -m pip install --upgrade pip pip install pylint + - name: Install Autopep8 + run: pip install autopep8 + - name: Lint Action + uses: wearerequired/lint-action@v2.3.0 + with: + autopep8: true + github_token: ${{ secrets.GITHUB_TOKEN }} - name: Analysing the code with pylint run: | pylint $(git ls-files '*.py') From 1a38bb88288fc2dfdd444634811b6dbc58f5b078 Mon Sep 17 00:00:00 2001 From: Rohit Dasgupta Date: Tue, 22 Oct 2024 16:45:10 -0500 Subject: [PATCH 3/3] Remove pylint We can add pylint in later --- .github/workflows/pylint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 7181759..865574e 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -25,6 +25,6 @@ jobs: with: autopep8: true github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Analysing the code with pylint - run: | - pylint $(git ls-files '*.py') + # - name: Analysing the code with pylint + # run: | + # pylint $(git ls-files '*.py')