From ecc3b86c774ddb445f6deffdf233243cb9f5c0f9 Mon Sep 17 00:00:00 2001 From: Priyanshi Khetwani Date: Wed, 27 Nov 2024 01:48:31 +0530 Subject: [PATCH] Added yamllint, fixed current linting errors, added github action --- .github/workflows/validate-yaml-lint.yaml | 9 +-------- .yamllint | 2 +- Makefile | 6 ------ 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/validate-yaml-lint.yaml b/.github/workflows/validate-yaml-lint.yaml index 91228c550..71699c37b 100644 --- a/.github/workflows/validate-yaml-lint.yaml +++ b/.github/workflows/validate-yaml-lint.yaml @@ -1,12 +1,5 @@ name: YamlLint -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: +on: [push, pull_request] jobs: yamllint: runs-on: ubuntu-latest diff --git a/.yamllint b/.yamllint index a5ba70419..807f351c9 100644 --- a/.yamllint +++ b/.yamllint @@ -28,7 +28,7 @@ rules: # Rules to control lines line-length: - max: 150 # Maximum 150 characters per line + max: 200 # Maximum 150 characters per line allow-non-breakable-words: true # Allow long words without breaks allow-non-breakable-inline-mappings: true # Allow long inline mappings without breaks empty-lines: diff --git a/Makefile b/Makefile index 08100b0e2..a9a760593 100644 --- a/Makefile +++ b/Makefile @@ -551,12 +551,6 @@ endif yamllint: @docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest /data --config-file /data/.yamllint --no-warnings -.PHONY: lint-yaml-no-warnings -lint-yaml-no-warnings: ## Run yamllint and won’t output warning level problems - @echo "Running yamllint and won't output warning level problems..." - @yamllint . --no-warnings - @echo "Linting Yaml files completed" - ## -------------------------------------- ## Cleanup / Verification ## --------------------------------------