diff --git a/.dprint.json b/.dprint.json new file mode 100644 index 0000000..085691f --- /dev/null +++ b/.dprint.json @@ -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" + ] +} diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/markdown-lint.yaml new file mode 100644 index 0000000..c79ffd2 --- /dev/null +++ b/.github/workflows/markdown-lint.yaml @@ -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" \ No newline at end of file diff --git a/README.md b/README.md index 0bea225..151a06b 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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)