Skip to content

Commit

Permalink
Added python linting workflow for quality code; issue mit-dci#264
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Rockett <[email protected]>
  • Loading branch information
rockett-m committed Jun 10, 2024
1 parent a9cbe52 commit f1f06a4
Show file tree
Hide file tree
Showing 4 changed files with 674 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 79
26 changes: 26 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pylint

on: [push, pull_request]

jobs:
lint:
runs-on: [macos-latest, ubuntu-latest]
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
# conda activate opencbdc_env
python -m pip install --upgrade pip
if [ -f requirements_py.txt ]; then pip install -r requirements_py.txt; fi
pip install pylint
- name: Lint with Pylint
run: |
# conda activate opencbdc_env
pylint $(git ls-files '*.py')
Loading

0 comments on commit f1f06a4

Please sign in to comment.