Skip to content

Commit b527ad4

Browse files
author
Theofilos Manitaras
committed
Use github/super-linter for unused import checks
1 parent 6907788 commit b527ad4

File tree

4 files changed

+11
-17
lines changed

4 files changed

+11
-17
lines changed

.github/linters/.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
select = F401

.github/workflows/main.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,15 @@ jobs:
4747
run: |
4848
docker run reframe:${{ matrix.modules-version }}
4949
50-
flake8:
51-
if: github.event_name == 'pull_request'
50+
unusedimports:
5251
runs-on: ubuntu-latest
5352
steps:
5453
- uses: actions/checkout@v2
5554
with:
5655
fetch-depth: 0
57-
- name: Changed Python Files
58-
run: |
59-
echo 'CHANGED_PYTHON_FILES<<EOF' >> $GITHUB_ENV
60-
git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.sha }} | grep '.py' >> $GITHUB_ENV
61-
echo 'EOF' >> $GITHUB_ENV
62-
- uses: actions/setup-python@v2
63-
with:
64-
python-version: 3.8
65-
- name: Unused Imports Check
66-
run: |
67-
pip install flake8
68-
echo 'Checking Python Files:'
69-
for f in "$CHANGED_PYTHON_FILES"; do echo "$f"; done
70-
flake8 --select F401 $CHANGED_PYTHON_FILES
56+
- name: Lint Code Base
57+
uses: github/super-linter@v3
58+
env:
59+
VALIDATE_ALL_CODEBASE: false
60+
VALIDATE_PYTHON_FLAKE8: true
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
</a>
44

55
[![Build Status](https://github.com/eth-cscs/reframe/workflows/ReFrame%20CI/badge.svg)](https://github.com/eth-cscs/reframe/actions?query=workflow%3A%22ReFrame+CI%22)
6+
[![GitHub Super-Linter](https://github.com/eth-cscs/reframe/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
67
[![Documentation Status](https://readthedocs.org/projects/reframe-hpc/badge/?version=latest)](https://reframe-hpc.readthedocs.io/en/latest/?badge=latest)
78
[![codecov.io](https://codecov.io/gh/eth-cscs/reframe/branch/master/graph/badge.svg)](https://codecov.io/github/eth-cscs/reframe)<br/>
89
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/eth-cscs/reframe?include_prereleases)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from reframe import VERSION
99

1010
with open('README.md') as read_me:
11-
long_description = ''.join(read_me.readlines()[15:])
11+
long_description = ''.join(read_me.readlines()[16:])
1212

1313
setuptools.setup(
1414
name='ReFrame-HPC',

0 commit comments

Comments
 (0)