Skip to content

Commit

Permalink
added yaml lint (#2132)
Browse files Browse the repository at this point in the history
* added yaml lint

* updated the doc
  • Loading branch information
Jeremy Facchetti authored May 27, 2022
1 parent 589256f commit b0f6ff2
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ run:
timeout: 10m
skip-dirs:
- vendor/portal
- vendor
skip-dirs-use-default: true
modules-download-mode: vendor

issues:
exclude-rules:
Expand All @@ -21,7 +24,6 @@ linters-settings:
- github.com/onsi/ginkgo
- github.com/onsi/gomega


linters:
disable-all: true
enable:
Expand Down
14 changes: 14 additions & 0 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Configuration file for MegaLinter
# See all available variables at https://megalinter.github.io/configuration/ and in linters documentation

APPLY_FIXES: none
# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling formats will be disabled by default
ENABLE_LINTERS:
- YAML_YAMLLINT # If you use ENABLE_LINTERS variable, all other linters will be disabled by default
EXCLUDED_DIRECTORIES:
- vendor
YAML_YAMLLINT_CONFIG_FILE: .yaml-lint.yml
LINTER_RULES_PATH: .
PRINT_ALPACA: false
GITHUB_STATUS_REPORTER: false
GITHUB_COMMENT_REPORTER: false
35 changes: 35 additions & 0 deletions .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---

yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

ignore: |
vendor/
*aro.openshift.io*.yaml
rules:
braces: enable
brackets: enable
colons: enable
commas: enable
comments: disable
comments-indentation: disable
document-end: disable
document-start: disable
empty-lines: enable
empty-values: disable
hyphens: enable
indentation: disable
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: enable
new-lines: enable
octal-values: disable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning
check-keys: false
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ lint-admin-portal:
test-python: pyenv az
. pyenv/bin/activate && \
azdev linter && \
azdev style && \
hack/format-yaml/format-yaml.py .pipelines
azdev style

admin.kubeconfig:
hack/get-admin-kubeconfig.sh /subscriptions/${AZURE_SUBSCRIPTION_ID}/resourceGroups/${RESOURCEGROUP}/providers/Microsoft.RedHatOpenShift/openShiftClusters/${CLUSTER} >admin.kubeconfig
Expand Down

0 comments on commit b0f6ff2

Please sign in to comment.