forked from analogdevicesinc/ai8x-synthesis
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.64 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
name: Lint code
on:
push:
branches-ignore: [master]
pull_request:
branches-ignore: [master]
jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check source code files for Unicode and CRLF
run: |
set -e
find . -type f -size +0c -regex '.*\.\(py\|yaml\|yml\|txt\|h\|c\|sh\)' -print0 | xargs -0 file | grep -P '^(?!.*ASCII)|CRLF' || exit 0
exit 1
- name: Check shell scripts for x-bit
run: |
set -e
find . -type f -name \*.sh \! -perm -1 -print0 | xargs -0 grep . || exit 0
exit 1
- name: Lint code
uses: super-linter/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: develop
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ANSIBLE: false
VALIDATE_EDITORCONFIG: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_JSCPD: false
VALIDATE_CPP: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_CLANG_FORMAT: false
VALIDATE_GITHUB_ACTIONS: false
FILTER_REGEX_EXCLUDE: (attic/.*|\.github/workflows/.*\.yml|assets/vscode/\.vscode/.*\.json)
- name: Install codespell
run: pip install codespell tomli
- name: Run codespell
run: codespell
# - name: Install markdown-lint-check
# run: npm install -g markdown-link-check
#
# - name: Run markdown-lint-check
# run: find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check -a 0 -p -v -r