Skip to content

Commit 523c2c1

Browse files
authored
Well documented README.md
A well documented readme.
1 parent 5c6ce17 commit 523c2c1

File tree

1 file changed

+36
-7
lines changed

1 file changed

+36
-7
lines changed

README.md

+36-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,54 @@
11
# annotate-snippets
22

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

55
[![crates.io](https://img.shields.io/crates/v/annotate-snippets.svg)](https://crates.io/crates/annotate-snippets)
6-
[![documentation](https://img.shields.io/badge/docs-master-blue.svg)][Documentation]
6+
[![documentation](https://img.shields.io/badge/docs-master-blue.svg)](https://docs.rs/annotate-snippets/)
77
![build status](https://github.com/rust-lang/annotate-snippets-rs/actions/workflows/ci.yml/badge.svg)
88

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+
------------
1015
It takes a data structure called `Snippet` on the input and produces a `String`
1116
which may look like this:
1217

1318
![Screenshot](./examples/expected_type.svg)
1419

1520
Local Development
1621
-----------------
17-
22+
To build and test the project locally, use the following commands:
23+
1824
cargo build
1925
cargo test
2026

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
2251

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

25-
[Documentation]: https://docs.rs/annotate-snippets/
54+
`Programming code slices`: are small, specific portions or snippets of a larger codebase.

0 commit comments

Comments
 (0)