-
Notifications
You must be signed in to change notification settings - Fork 38
99 lines (95 loc) · 3.02 KB
/
lint.yml
File metadata and controls
99 lines (95 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: "[Code Analysis] Lint code"
run-name: "[Code Analysis] Lint code"
on: # yamllint disable-line rule:truthy
pull_request:
branches:
- main
- release-*
workflow_dispatch: {}
permissions:
contents: read # needed for actions/checkout
jobs:
required-linters:
name: "Run required linters"
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Setup environment"
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@14aa8ce3d0a5455574fc7fce7d90b2d18636c68e # 0.1.40
with:
bootstrap_tools: "base"
- name: "Install prettier tool"
run: |
npm install --save-dev prettier prettier-plugin-jinja-template
- name: "Install GHA linter"
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.7
- name: "Run prettier check"
if: always()
run: |
make prettier-check
- name: "Run GHA linter"
if: always()
run: |
./actionlint --config-file .github/resources/actionlint.yaml
- name: "Check python indent"
if: always()
run: |
make indent-check
optional-linters:
name: "Run optional linters"
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "Setup environment"
uses: open-edge-platform/orch-ci/.github/actions/bootstrap@14aa8ce3d0a5455574fc7fce7d90b2d18636c68e # 0.1.40
with:
bootstrap_tools: "base,python,shellcheck,hadolint,"
- name: "Install python linters"
run: |
pip install -r .github/resources/requirements.txt
- name: "Install Javascript linter and prettier tool"
run: |
npm install --save-dev eslint@latest @eslint/js@latest
- name: "Install cpp linter"
run: |
pipx install cpplint
- name: "Run Python linter - pylint"
if: always()
continue-on-error: true
run: |
make lint-python-pylint
- name: "Run Python linter - flake8"
if: always()
continue-on-error: true
run: |
make lint-python-flake8
- name: "Run JavaScript linter"
if: always()
continue-on-error: true
run: |
make lint-javascript
- name: "Run C++ linter"
if: always()
continue-on-error: true
run: |
make lint-cpp
- name: "Run shell linter - shellcheck"
if: always()
continue-on-error: true
run: |
make lint-shell
- name: "Run dockerfiles linter"
if: always()
continue-on-error: true
run: |
make lint-dockerfiles