From f449cd45e8aabdaba19da76a75832b9528850518 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Fri, 4 Mar 2022 15:57:39 +0100 Subject: [PATCH] github/workflows: check dnf-json with pylint Use a fedora container for dnf dependency. Add a pylintrc file to the project with 120 max line length and docstrings ignored. --- .github/workflows/tests.yml | 14 ++++++++++++++ .pylintrc | 7 +++++++ 2 files changed, 21 insertions(+) create mode 100644 .pylintrc diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 72592d6b5..2cdab277b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,6 +37,20 @@ jobs: - name: Send coverage to codecov.io run: bash <(curl -s https://codecov.io/bash) + python-lint: + name: "🐍 Lint (dnf-json)" + runs-on: ubuntu-latest + container: + image: docker.io/library/fedora:latest + steps: + - uses: actions/checkout@v2.4.0 + - name: Install dependencies + run: | + dnf -y install python3-pylint + - name: Analysing the code with pylint + run: | + python3 -m pylint dnf-json + unit-tests: name: "🛃 Unit tests" runs-on: ubuntu-20.04 diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 000000000..c39c34a7e --- /dev/null +++ b/.pylintrc @@ -0,0 +1,7 @@ +[FORMAT] +max-line-length=120 + +[MESSAGES CONTROL] +disable=missing-module-docstring, + missing-class-docstring, + missing-function-docstring