2023-03-15 06:18:34 +00:00
|
|
|
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
name: Linters
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
|
|
push:
|
2023-03-16 08:09:13 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2023-03-15 06:18:34 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
pylint:
|
|
|
|
name: Lint Python files
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install pylint
|
|
|
|
run: sudo pip3 install pylint
|
|
|
|
- name: pylint
|
2023-12-26 03:28:47 +00:00
|
|
|
run: pylint rootfs.py lib/utils.py lib/generator.py lib/target.py --disable=duplicate-code
|
2023-03-15 06:18:34 +00:00
|
|
|
|
|
|
|
shellcheck:
|
|
|
|
name: Lint shell files
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: shellcheck
|
2023-12-07 10:21:03 +00:00
|
|
|
run: shellcheck steps/helpers.sh download-distfiles.sh
|
2023-03-15 06:18:34 +00:00
|
|
|
|
|
|
|
reuse:
|
|
|
|
name: Lint reuse information
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install reuse
|
|
|
|
run: sudo pip3 install reuse
|
|
|
|
- name: reuse
|
|
|
|
run: reuse lint
|