Skip to content

Commit 1263440

Browse files
Add code quality checks with cspell, markdownlint, and yamllint (#84)
* Initial plan * Add code quality checks with cspell, markdownlint, and yamllint Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * Fix markdown, YAML, and spelling issues to pass code quality checks Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * Add pipeline-related words to cspell dictionary Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
1 parent 26e5acb commit 1263440

File tree

15 files changed

+262
-138
lines changed

15 files changed

+262
-138
lines changed

.cspell.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"words": [
5+
"SPDX",
6+
"SpdxModel",
7+
"DemaConsulting",
8+
"SBOM",
9+
"sbom",
10+
"dotnet",
11+
"NuGet",
12+
"nuget",
13+
"spdx",
14+
"deserializer",
15+
"serializer",
16+
"Dema",
17+
"workflow",
18+
"workflows",
19+
"yamllint",
20+
"markdownlint",
21+
"cspell",
22+
"Copilot",
23+
"opencover",
24+
"OpenCover",
25+
"snupkg",
26+
"Anson",
27+
"ibiqlik",
28+
"sonarscanner",
29+
"ncipollo",
30+
"DEMACONSULTINGNUGETKEY"
31+
],
32+
"ignorePaths": [
33+
"**/*.spdx.json",
34+
"**/bin/**",
35+
"**/obj/**",
36+
"**/.git/**",
37+
"**/node_modules/**",
38+
"**/*.nupkg",
39+
"**/*.snupkg"
40+
]
41+
}

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: 🐛 Bug Report
23
description: Report a bug or issue with SpdxModel
34
title: "[Bug]: "
@@ -6,7 +7,8 @@ body:
67
- type: markdown
78
attributes:
89
value: |
9-
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible to help us understand and fix the issue.
10+
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible to help
11+
us understand and fix the issue.
1012
1113
- type: textarea
1214
id: description
@@ -45,9 +47,9 @@ body:
4547
2. Call method X with parameters...
4648
3. See error...
4749
value: |
48-
1.
49-
2.
50-
3.
50+
1.
51+
2.
52+
3.
5153
validations:
5254
required: true
5355

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
blank_issues_enabled: false
23
contact_links:
34
- name: 💬 GitHub Discussions

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: ✨ Feature Request
23
description: Suggest a new feature or enhancement for SpdxModel
34
title: "[Feature]: "
@@ -6,7 +7,8 @@ body:
67
- type: markdown
78
attributes:
89
value: |
9-
Thanks for suggesting a new feature! Please provide as much detail as possible to help us understand your request.
10+
Thanks for suggesting a new feature! Please provide as much detail as possible to help us understand your
11+
request.
1012
1113
- type: textarea
1214
id: summary

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: 2
23
updates:
34
# Enable version updates for NuGet

.github/workflows/build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ on:
1616
jobs:
1717
build:
1818
permissions:
19-
contents: read # To read repository contents
20-
pull-requests: write # To write pull requests analysis results and artifacts
19+
contents: read # To read repository contents
20+
pull-requests: write # To write pull requests analysis results and artifacts
2121

2222
runs-on: ${{ inputs.os }}
2323

.github/workflows/build_on_push.yaml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,34 @@ on:
88
- cron: '0 17 * * 1'
99

1010
jobs:
11+
code-quality:
12+
name: Code Quality
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read # To read repository contents
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v6
19+
20+
- name: Check Spelling
21+
uses: streetsidesoftware/cspell-action@v8
22+
23+
- name: Check Markdown
24+
uses: DavidAnson/markdownlint-cli2-action@v22
25+
with:
26+
globs: '**/*.md'
27+
28+
- name: Check YAML
29+
uses: ibiqlik/action-yamllint@v3
30+
with:
31+
file_or_dir: .
32+
config_file: .yamllint.yaml
33+
1134
build-windows:
1235
name: Build Windows
1336
permissions:
14-
contents: read # To read repository contents
15-
pull-requests: write # To write pull requests analysis results and artifacts
37+
contents: read # To read repository contents
38+
pull-requests: write # To write pull requests analysis results and artifacts
1639
uses: ./.github/workflows/build.yaml
1740
with:
1841
os: windows-latest
@@ -23,8 +46,8 @@ jobs:
2346
build-linux:
2447
name: Build Linux
2548
permissions:
26-
contents: read # To read repository contents
27-
pull-requests: write # To write pull requests analysis results and artifacts
49+
contents: read # To read repository contents
50+
pull-requests: write # To write pull requests analysis results and artifacts
2851
uses: ./.github/workflows/build.yaml
2952
with:
3053
os: ubuntu-latest

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
build:
2323
name: Build Linux
2424
permissions:
25-
contents: read # To read repository contents
26-
pull-requests: write # To write pull requests analysis results and artifacts
25+
contents: read # To read repository contents
26+
pull-requests: write # To write pull requests analysis results and artifacts
2727
uses: ./.github/workflows/build.yaml
2828
with:
2929
os: ubuntu-latest
@@ -33,7 +33,7 @@ jobs:
3333

3434
release:
3535
permissions:
36-
contents: write # To create releases
36+
contents: write # To create releases
3737

3838
runs-on: ubuntu-latest
3939

.markdownlint.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"default": true,
3+
"MD003": { "style": "atx" },
4+
"MD007": { "indent": 2 },
5+
"MD013": { "line_length": 120 },
6+
"MD033": false,
7+
"MD041": false
8+
}

.yamllint.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
# yamllint configuration for SpdxModel
3+
# This configuration defines the rules for YAML file linting
4+
5+
extends: default
6+
7+
rules:
8+
# Allow 'on:' in GitHub Actions workflows (not a boolean value)
9+
truthy:
10+
allowed-values: ['true', 'false', 'on', 'off']
11+
check-keys: true
12+
13+
# Allow longer lines for URLs and complex expressions
14+
line-length:
15+
max: 120
16+
level: error
17+
18+
# Ensure proper indentation
19+
indentation:
20+
spaces: 2
21+
indent-sequences: true
22+
23+
# Ensure proper comment formatting
24+
comments:
25+
min-spaces-from-content: 2

0 commit comments

Comments
 (0)