Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/yaml-format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: YAML Format & Sort Check

on:
push:
pull_request:

jobs:
yaml-format-check:
runs-on: ubuntu-latest
name: Check YAML formatting and sorting

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm install --legacy-peer-deps

- name: Check YAML format and sort
run: npm run yaml:check

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +9 to +26

4 changes: 3 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
"recommendations": [
"JaimeOlivares.yuml",
"ms-azuretools.vscode-azurefunctions",
"ms-azuretools.vscode-azurestaticwebapps"
"ms-azuretools.vscode-azurestaticwebapps",
"redhat.vscode-yaml",
"PeterSchmalfeldt.vscode-yaml-sort"
]
}
16 changes: 15 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{
"sql-formatter.dialect": "n1ql",
"sql-formatter.uppercase": true
"sql-formatter.uppercase": true,

// YAML Sort extension (PeterSchmalfeldt.vscode-yaml-sort)
// Sorts keys alphabetically and recursively — matches the app's formatYAML logic.
"yaml-sort.sortOrder": "alphabetically",
"yaml-sort.useLeadingDashes": false,
"yaml-sort.indent": 2,
"yaml-sort.forceQuotes": false,
"yaml-sort.quotingType": "'",

// Format YAML files on save using the YAML Sort extension
"[yaml]": {
"editor.defaultFormatter": "PeterSchmalfeldt.vscode-yaml-sort",
"editor.formatOnSave": true
}
}
Loading
Loading