Skip to content

Commit

Permalink
ci(doc consistency): check that lib.rs and README.md are consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Nahor committed Mar 4, 2024
1 parent 22b29ee commit ba1ab22
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
with:
toolchain: stable
components: rustfmt
- name: Install cargo-readme
run: cargo install cargo-readme
- name: Check doc consistency
shell: bash
run: diff -q README.md <(cargo readme) || echo "::error title='Inconsistent README.md and lib.rs'::Update lib.rs then use cargo-readme to update README.md"
- name: rustfmt
run: cargo fmt --all -- --check
- name: docs
Expand Down
45 changes: 24 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,29 @@ libraries and such might not want.

### Table of Contents <!-- omit in toc -->

- [About](#about)
- [Features](#features)
- [Installing](#installing)
- [Example](#example)
- [Using](#using)
- [... in libraries](#-in-libraries)
- [... in application code](#-in-application-code)
- [... in `main()`](#-in-main)
- [... diagnostic code URLs](#-diagnostic-code-urls)
- [... snippets](#-snippets)
- [... help text](#-help-text)
- [... severity level](#-severity-level)
- [... multiple related errors](#-multiple-related-errors)
- [... delayed source code](#-delayed-source-code)
- [... handler options](#-handler-options)
- [... dynamic diagnostics](#-dynamic-diagnostics)
- [... syntax highlighting](#-syntax-highlighting)
- [... collection of labels](#-collection-of-labels)
- [Acknowledgements](#acknowledgements)
- [License](#license)
- [`miette`](#miette)
- [About](#about)
- [Features](#features)
- [Installing](#installing)
- [Example](#example)
- [Using](#using)
- [... in libraries](#-in-libraries)
- [... in application code](#-in-application-code)
- [... in `main()`](#-in-main)
- [... diagnostic code URLs](#-diagnostic-code-urls)
- [... snippets](#-snippets)
- [... help text](#-help-text)
- [... severity level](#-severity-level)
- [... multiple related errors](#-multiple-related-errors)
- [... delayed source code](#-delayed-source-code)
- [... Diagnostic-based error sources.](#-diagnostic-based-error-sources)
- [... handler options](#-handler-options)
- [... dynamic diagnostics](#-dynamic-diagnostics)
- [... syntax highlighting](#-syntax-highlighting)
- [... collection of labels](#-collection-of-labels)
- [MSRV](#msrv)
- [Acknowledgements](#acknowledgements)
- [License](#license)

### Features

Expand Down Expand Up @@ -665,7 +668,7 @@ println!("{:?}", report)

<!-- TODO: screenshot goes here once default Theme is decided -->

To use the built-in highlighting functionality, you must enable the
To use the bublablablailt-in highlighting functionality, you must enable the
`syntect-highlighter` crate feature. When this feature is enabled, `miette` will
automatically use the [`syntect`] crate to highlight the `#[source_code]`
field of your [`Diagnostic`].
Expand Down

0 comments on commit ba1ab22

Please sign in to comment.