Skip to content

Commit dcff9c4

Browse files
ccoVeilleingydotnet
authored andcommitted
Add file names linting to the CI
ls-lint is a powerful tool for linting file names. It helps ensure that filenames follow a consistent naming convention. Right now, we are only enforcing to disallow .yml files. Only .yaml files are allowed.
1 parent 3478cf2 commit dcff9c4

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/files.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ jobs:
2727
- name: yamllint
2828
uses: ibiqlik/action-yamllint@v3
2929

30+
ls-lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: checkout-action
34+
uses: actions/checkout@v5
35+
36+
- name: ls-lint
37+
uses: ls-lint/action@v2
38+
with:
39+
config: .ls-lint.yaml
40+
3041
typos:
3142
runs-on: ubuntu-latest
3243
steps:

.ls-lint.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ls-lint configuration file.
2+
# More information on the file format can be found on https://ls-lint.org/
3+
ls:
4+
# root directory
5+
.yml: exists:0 # .yml files
6+
.*.yml: exists:0 # .yml dotfiles
7+
8+
# any subdirectory, even dotfile directory
9+
'**':
10+
.yml: exists:0 # .yml files
11+
.*.yml: exists:0 # .yml dotfiles
12+
13+
ignore:
14+
- .git # git folder
15+
- .cache # cache folder
16+
- yts/testdata # third-party folder

0 commit comments

Comments
 (0)