Skip to content

Commit

Permalink
test(STONEO11Y-49): add yamllint
Browse files Browse the repository at this point in the history
Signed-off-by: Sri Vignesh <[email protected]>
  • Loading branch information
srivickynesh committed Mar 13, 2023
1 parent 8f8f435 commit f9a9c0a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .tekton/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ spec:
python -m pip install gitlint
git fetch --unshallow
gitlint --commits "origin/$(params.target-branch)..HEAD"
- name: yaml-lint
workspaces:
- name: workspace
workspace: workspace
runAfter:
- clone-repository
taskSpec:
workspaces:
- name: workspace
steps:
- name: yaml-lint
image: registry.access.redhat.com/ubi9/python-39:latest
workingDir: $(workspaces.workspace.path)
script: |
#!/bin/bash -ex
python -m pip install yamllint
yamllint .
workspaces:
- name: workspace
volumeClaimTemplate:
Expand Down
26 changes: 26 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
rules:
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation:
level: warning
document-end: disable
document-start: disable
empty-lines: enable
empty-values: enable
hyphens: enable
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: disable
new-lines: enable
octal-values: enable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
indentation:
indent-sequences: whatever

0 comments on commit f9a9c0a

Please sign in to comment.