diff options
author | silverwind <me@silverwind.io> | 2023-09-08 04:24:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 04:24:06 +0200 |
commit | 3c0c27965836328abd2668dcd77710ee2460535e (patch) | |
tree | 57302ecf1c5619be185d888e91c1bd876cf9942e /.yamllint.yaml | |
parent | Fix yaml quoting (#26964) (diff) | |
download | forgejo-3c0c27965836328abd2668dcd77710ee2460535e.tar.xz forgejo-3c0c27965836328abd2668dcd77710ee2460535e.zip |
Add `yamllint` (#26965)
So that https://github.com/go-gitea/gitea/pull/26964 does not happen
again. Merge this after that PR. Config is based on
[node's](https://github.com/nodejs/node/blob/main/.yamllint.yaml).
---------
Co-authored-by: techknowlogick <techknowlogick@gitea.com>
Diffstat (limited to '.yamllint.yaml')
-rw-r--r-- | .yamllint.yaml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000000..c0fce7c301 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,48 @@ +extends: default + +rules: + braces: + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + max-spaces-inside-empty: 0 + + brackets: + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + max-spaces-inside-empty: 0 + + comments: + require-starting-space: true + ignore-shebangs: true + min-spaces-from-content: 1 + + comments-indentation: + level: error + + document-start: + level: error + present: false + ignore: | + /.drone.yml + + document-end: + present: false + + empty-lines: + max: 1 + + indentation: + spaces: 2 + + line-length: disable + + truthy: + allowed-values: ["true", "false", "on", "off"] + +ignore: | + .venv + node_modules + /models/fixtures + /models/migrations/fixtures |