-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (35 loc) · 1.01 KB
/
linter.yml
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
name: "Code Linter"
# It trigger when any push or PR is made in the the code under the branch configured
on:
push:
branches:
- main
pull_request:
branches:
- main
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
# Linter to check errors
jobs:
Linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Setup Linter cfn-lint
uses: scottbrenner/cfn-lint-action@v2
- name: Run Linter
run: |
cfn-lint --version
cfn-lint -t ./**/*template.yaml -i W E3012 E3005
- name: Lint Code Base
uses: github/super-linter@v4
env:
VALIDATE_PYTHON_PYLINT: true
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_POWERSHELL: true
VALIDATE_JSON: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}