Skip to content

Commit 2358043

Browse files
committed
Cherrypick out linter
1 parent 03f79bf commit 2358043

File tree

3 files changed

+85
-2
lines changed

3 files changed

+85
-2
lines changed

.dprint.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"lineWidth": 80,
3+
"markdown": {
4+
"textWrap": "always",
5+
"lineWidth": 80
6+
},
7+
"includes": ["**/*.md"],
8+
"excludes": [
9+
"**/node_modules",
10+
"**/*-lock.json",
11+
"**/target"
12+
],
13+
"plugins": [
14+
"https://plugins.dprint.dev/markdown-0.16.3.wasm"
15+
]
16+
}

.github/workflows/markdown-lint.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Markdown Lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**/*.md'
7+
- '.github/workflows/markdown-lint.yaml'
8+
- '.dprint.json'
9+
10+
jobs:
11+
markdown-lint:
12+
name: Lint Markdown Files
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Rust
19+
uses: dtolnay/rust-toolchain@stable
20+
with:
21+
toolchain: stable
22+
components: rustfmt, clippy
23+
24+
- name: Cache Rust dependencies
25+
uses: actions/cache@v4
26+
with:
27+
path: |
28+
~/.cargo/registry
29+
~/.cargo/git
30+
target
31+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-cargo-
34+
35+
- name: Install dprint
36+
run: cargo install dprint
37+
38+
- name: Run dprint check
39+
run: dprint check "**/*.md"

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ product related artefacts, like BOMs, between systems. The work includes:
2626
- Querying
2727

2828
System and tooling implementors are encouraged to adopt this API standard for
29-
sending/receiving transparency artefacts between systems.
29+
sending/receiving transparency artefacts between systems.
3030
This will enable more widespread
3131
"out of the box" integration support in the BOM ecosystem.
3232

@@ -49,7 +49,7 @@ The Transparency Exchange API (TEA) supports publication and retrieval of a set
4949

5050
### xBOM
5151

52-
Bill of materials for any type of component and service are supported. This includes, but is not limited to, SBOM, HBOM, AI/ML-BOM, SaaSBOM, and CBOM. The API provides a BOM format agnostic way of publishing, searching, and retrieval of xBOM artifacts.
52+
Bill of materials for any type of component and service are supported. This includes, but is not limited to, SBOM, HBOM, AI/ML-BOM, SaaSBOM, and CBOM. The API provides a BOM format agnostic way of publishing, searching, and retrieval of xBOM artifacts.
5353

5454
### CDXA
5555

@@ -90,6 +90,34 @@ Insights allows for “limited transparency” that can be asked and answered us
9090

9191
![](images/Project-Koala.svg)
9292

93+
## Contributing
94+
95+
### Markdown Formatting
96+
97+
This repository uses a Rust-based Markdown formatter (dprint) to ensure
98+
consistent documentation formatting. When submitting pull requests that include
99+
Markdown files, the formatter will automatically check for formatting issues.
100+
101+
To run the formatter locally:
102+
103+
1. Install dprint:
104+
```bash
105+
cargo install dprint
106+
```
107+
108+
2. Check for formatting issues:
109+
```bash
110+
dprint check "**/*.md"
111+
```
112+
113+
3. Automatically format all Markdown files:
114+
```bash
115+
dprint fmt "**/*.md"
116+
```
117+
118+
The formatter enforces a maximum line length of 80 characters and consistent
119+
formatting across all Markdown files.
120+
93121
## Previous work
94122

95123
- [The CycloneDX BOM Exchange API](/api/bomexchangeapi.md)

0 commit comments

Comments
 (0)