|
1 | 1 | # annotate-snippets
|
2 | 2 |
|
3 |
| -`annotate-snippets` is a Rust library for annotation of programming code slices. |
| 3 | +`annotate-snippets` is a Rust library designed to annotate programming code slices, making debugging and diagnostic rendering more intuitive and visually appealing. |
4 | 4 |
|
5 | 5 | [](https://crates.io/crates/annotate-snippets)
|
6 |
| -[][Documentation] |
| 6 | +[](https://docs.rs/annotate-snippets/) |
7 | 7 | 
|
8 | 8 |
|
9 |
| -The library helps visualize meta information annotating source code slices. |
| 9 | +About the Library |
| 10 | +----------------- |
| 11 | +The annotate-snippets library provides tools to annotate source code slices with rich, meta information. It generates visually organized, styled error or informational messages, helping developers quickly pinpoint issues in their code. |
| 12 | + |
| 13 | +Key Feature: |
| 14 | +------------ |
10 | 15 | It takes a data structure called `Snippet` on the input and produces a `String`
|
11 | 16 | which may look like this:
|
12 | 17 |
|
13 | 18 | 
|
14 | 19 |
|
15 | 20 | Local Development
|
16 | 21 | -----------------
|
17 |
| - |
| 22 | +To build and test the project locally, use the following commands: |
| 23 | + |
18 | 24 | cargo build
|
19 | 25 | cargo test
|
20 | 26 |
|
21 |
| -When submitting a PR please use [`cargo fmt`][] (nightly). |
| 27 | +Formatting |
| 28 | +---------- |
| 29 | +Before submitting a pull request (PR), ensure the code follows Rust’s formatting standards by running: |
| 30 | + |
| 31 | + cargo fmt |
| 32 | + |
| 33 | +Contributing |
| 34 | +------------ |
| 35 | +When submitting a PR please use [`cargo fmt`](https://github.com/rust-lang/rustfmt) |
| 36 | +**NOTE:-** `cargo fmt` requires the nightly version of Rust. |
| 37 | + |
| 38 | +Core Concepts: |
| 39 | +-------------- |
| 40 | +`Annotation`: Adding labels or notes to specific parts of code slices for clarity. |
| 41 | + |
| 42 | +`Snippet`: A small section of programming code to which annotations and diagnostics are applied. |
| 43 | + |
| 44 | +`Diagnostic Rendering`: Presenting errors or meta information visually for better debugging. |
| 45 | + |
| 46 | +`Renderer`: A mechanism that transforms the annotated snippets into styled, readable output. |
| 47 | + |
| 48 | +`Meta Information`: Data that gives additional context or details about a code snippet, like where an error occurred or what caused it. |
| 49 | + |
| 50 | +`Feature Parity`: Ensuring two tools (or versions of the same tool) have the same capabilities |
22 | 51 |
|
23 |
| -[`cargo fmt`]: https://github.com/rust-lang/rustfmt |
| 52 | +`Error Severity Levels`: Categories that describe how bad an error is (e.g., Error, Warning, Info) to help prioritize fixes. |
24 | 53 |
|
25 |
| -[Documentation]: https://docs.rs/annotate-snippets/ |
| 54 | +`Programming code slices`: are small, specific portions or snippets of a larger codebase. |
0 commit comments