From f273624bc958975cd5c1b910d420002389333aee Mon Sep 17 00:00:00 2001 From: Dave Ogle Date: Fri, 15 Nov 2024 11:00:09 +0000 Subject: [PATCH] #535: Add yamllint to lint yaml files --- .config/.markdownlint.yaml | 4 ++-- .config/.yamllint | 7 +++++++ .github/workflows/linting-check.yml | 23 ++++++++++++++++++++++- services/crypto/secMgmt/features.yaml | 23 ++++++++++++----------- 4 files changed, 43 insertions(+), 14 deletions(-) create mode 100644 .config/.yamllint diff --git a/.config/.markdownlint.yaml b/.config/.markdownlint.yaml index 41542ad8..999f256f 100644 --- a/.config/.markdownlint.yaml +++ b/.config/.markdownlint.yaml @@ -84,7 +84,7 @@ MD022: MD023: true # MD024/no-duplicate-heading : Multiple headings with the same content : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md024.md -MD024: +MD024: siblings_only: true # MD025/single-title/single-h1 : Multiple top-level headings in the same document : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md025.md @@ -246,4 +246,4 @@ MD055: style: "consistent" # MD056/table-column-count : Table column count : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md056.md -MD056: true \ No newline at end of file +MD056: true diff --git a/.config/.yamllint b/.config/.yamllint new file mode 100644 index 00000000..d79206a5 --- /dev/null +++ b/.config/.yamllint @@ -0,0 +1,7 @@ +extends: default + +rules: + indentation: + spaces: 2 # Enforce 2 spaces for indentation + line-length: + max: 120 # Allow up to 120 characters per line diff --git a/.github/workflows/linting-check.yml b/.github/workflows/linting-check.yml index 7d5c47f5..d1364956 100644 --- a/.github/workflows/linting-check.yml +++ b/.github/workflows/linting-check.yml @@ -20,4 +20,25 @@ jobs: run: npm install -g markdownlint-cli - name: Run markdownlint - run: markdownlint '**/*.md' --config ./.config/.markdownlint.yaml \ No newline at end of file + run: markdownlint '**/*.md' --config ./.config/.markdownlint.yaml + + yaml-lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" # Use any compatible Python 3 version + + - name: Install yamllint + run: | + python -m pip install --upgrade pip + pip install yamllint + + - name: Run yamllint + run: | + yamllint -c ./.config/.yamllint . diff --git a/services/crypto/secMgmt/features.yaml b/services/crypto/secMgmt/features.yaml index 1091fd86..fd6f1945 100644 --- a/services/crypto/secMgmt/features.yaml +++ b/services/crypto/secMgmt/features.yaml @@ -1,14 +1,14 @@ common_features: - - CCC.F01 # Encryption in Transit Enabled by Default - - CCC.F02 # Encryption at Rest Enabled by Default - - CCC.F03 # Access/Activity Logs - - CCC.F06 # Identity-Based Access Control - - CCC.F07 # Event Notifications - - CCC.F08 # Multi-zone Deployment - - CCC.F09 # Monitoring - - CCC.F12 # Restore - - CCC.F14 # API Access - - CCC.F19 # On-Demand Scaling + - CCC.F01 # Encryption in Transit Enabled by Default + - CCC.F02 # Encryption at Rest Enabled by Default + - CCC.F03 # Access/Activity Logs + - CCC.F06 # Identity-Based Access Control + - CCC.F07 # Event Notifications + - CCC.F08 # Multi-zone Deployment + - CCC.F09 # Monitoring + - CCC.F12 # Restore + - CCC.F14 # API Access + - CCC.F19 # On-Demand Scaling features: - id: CCC.SecMgmt.F01 # Secret Storage @@ -29,7 +29,8 @@ features: - id: CCC.SecMgmt.F04 # Secret Replication Policies title: Secret Replication Policies description: | - Allows configuration of secret replication policies to control where secrets are stored and replicated, supporting compliance with data residency requirements. + Allows configuration of secret replication policies to control where secrets are stored and replicated, + supporting compliance with data residency requirements. - id: CCC.SecMgmt.F05 # Secure Secret Retrieval API title: Secure Secret Retrieval API