feat: add linter and ci configs
This commit is contained in:
parent
8e8a7890dc
commit
8eb19c67e8
4 changed files with 78 additions and 0 deletions
23
.ansible-lint
Normal file
23
.ansible-lint
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
|
||||
exclude_paths:
|
||||
- ".gitlab/*"
|
||||
- ".gitlab-ci.yml"
|
||||
- "defaults/main.yaml"
|
||||
- "meta/main.yaml"
|
||||
- "vars/*"
|
||||
|
||||
kinds:
|
||||
- playbook: "**/*.{yml,yaml}"
|
||||
|
||||
skip_list:
|
||||
- "command-shell"
|
||||
- "experimental"
|
||||
- "git-latest"
|
||||
- "no-changed-when"
|
||||
- "no-handler"
|
||||
- "name[casing]"
|
||||
- "name[template]"
|
||||
- "risky-file-permissions"
|
||||
- "schema[playbook]"
|
||||
- "var-naming[no-role-prefix]"
|
||||
13
.gitlab-ci.yml
Normal file
13
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
|
||||
# gitlab stages
|
||||
stages:
|
||||
- "gitleaks"
|
||||
- "linting"
|
||||
|
||||
# include components
|
||||
include:
|
||||
- component: "$CI_SERVER_FQDN/components/ansible/linting@v3.0.3"
|
||||
- component: "$CI_SERVER_FQDN/components/gitleaks/gitleaks@v1.0.0"
|
||||
- component: "$CI_SERVER_FQDN/components/markdownlint/markdownlint@1.0.0"
|
||||
- component: "$CI_SERVER_FQDN/components/yamllint/yamllint@1.0.2"
|
||||
12
.markdownlint-cli2.jsonc
Normal file
12
.markdownlint-cli2.jsonc
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
// files to lint
|
||||
"globs": [
|
||||
"readme.md"
|
||||
],
|
||||
// linting rules
|
||||
"config": {
|
||||
"MD013": {
|
||||
"line_length": 120
|
||||
}
|
||||
}
|
||||
}
|
||||
30
.yamllint
Normal file
30
.yamllint
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
extends: 'default'
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
forbid: true
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
comments-indentation: false
|
||||
empty-lines:
|
||||
max: 2
|
||||
indentation:
|
||||
spaces: 2
|
||||
check-multi-line-strings: true
|
||||
line-length:
|
||||
max: 120
|
||||
allow-non-breakable-words: true
|
||||
allow-non-breakable-inline-mappings: true
|
||||
new-line-at-end-of-file: 'enable'
|
||||
octal-values:
|
||||
forbid-implicit-octal: true
|
||||
forbid-explicit-octal: true
|
||||
truthy:
|
||||
allowed-values:
|
||||
- 'true'
|
||||
- 'false'
|
||||
quoted-strings:
|
||||
quote-type: 'any'
|
||||
required: true
|
||||
Loading…
Add table
Add a link
Reference in a new issue