Skip to content

Add linter to gh action #1

Add linter to gh action

Add linter to gh action #1

Workflow file for this run

name: Lint
on: [push, pull_request]
permissions:
contents: read
jobs:
lint:
name: Lint Code Base
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout repository
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: |
python -m pip install --upgrade pip
pip install bandit pylint isort black
- name: Run Bandit Security Linter
run: bandit -r custom_components/sensus_analytics
- name: Run Pylint
run: pylint custom_components/sensus_analytics
- name: Run isort
run: isort --profile=black --check-only custom_components/sensus_analytics
- name: Run Black
run: black --line-length=100 --check custom_components/sensus_analytics