-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (69 loc) · 2.02 KB
/
Linters.yml
File metadata and controls
79 lines (69 loc) · 2.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
---
# Mega-Linter GitHub Action configuration file
# More info at https://nvuillam.github.io/mega-linter
name: Linters
on:
push:
tags:
- '**'
branches:
- main
pull_request:
branches:
- main
env:
APPLY_FIXES: none
APPLY_FIXES_EVENT: pull_request
APPLY_FIXES_MODE: commit
jobs:
cancel_duplicates:
name: Cancel duplicate jobs
runs-on: ubuntu-latest
steps:
- uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
python_lint:
name: Bandit, Pylint, Flake8 (Mega-Linter)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Mega-Linter
id: ml
uses: nvuillam/mega-linter/flavors/python@v4
env:
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
markdown_lint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Markdown Linting Action
uses: avto-dev/markdown-lint@v1.5.0
with:
# Disabled in markdownlint.json:
# MD001 - Heading Increment
# MD013 - Line Length
# MD024 - Duplicate Headings
# MD026 - Trailing punctuation in header
# MD033 - No inline HTML
# MD036 - No Emphasis as Heading
# MD041 - No Emphasis as Heading
# MD041 - First line in file should be a H1
# MD022 - Blanks around headings
# MD032 - Blanks around lists
# MD012 - No multiple blanks
args: "./README.md ./docs/*.md"
- name: Link Checker
id: lc
uses: lycheeverse/lychee-action@v1.4.1
with:
args: --verbose "./README.md ./CHANGELOG.md ./docs/*.md"
- name: Fail if links are broken
run: exit ${{ steps.lc.outputs.exit_code }}