Skip to content

Cherrypick out linter #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
16 changes: 16 additions & 0 deletions .dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"lineWidth": 80,
"markdown": {
"textWrap": "always",
"lineWidth": 80
},
"includes": ["**/*.md"],
"excludes": [
"**/node_modules",
"**/*-lock.json",
"**/target"
],
"plugins": [
"https://plugins.dprint.dev/markdown-0.16.3.wasm"
]
}
39 changes: 39 additions & 0 deletions .github/workflows/markdown-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Markdown Lint

on:
pull_request:
paths:
- '**/*.md'
- '.github/workflows/markdown-lint.yaml'
- '.dprint.json'

jobs:
markdown-lint:
name: Lint Markdown Files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy

- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Install dprint
run: cargo install dprint

- name: Run dprint check
run: dprint check "**/*.md"
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ product related artefacts, like BOMs, between systems. The work includes:
- Querying

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

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

### xBOM

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.
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.

### CDXA

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

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

## Contributing

### Markdown Formatting

This repository uses a Rust-based Markdown formatter (dprint) to ensure
consistent documentation formatting. When submitting pull requests that include
Markdown files, the formatter will automatically check for formatting issues.

To run the formatter locally:

1. Install dprint:
```bash
cargo install dprint
```

2. Check for formatting issues:
```bash
dprint check "**/*.md"
```

3. Automatically format all Markdown files:
```bash
dprint fmt "**/*.md"
```

The formatter enforces a maximum line length of 80 characters and consistent
formatting across all Markdown files.

## Previous work

- [The CycloneDX BOM Exchange API](/api/bomexchangeapi.md)
Expand Down
Loading