mirror of
https://github.com/biomejs/biome.git
synced 2025-08-04 18:58:18 +00:00
![]()
Some checks are pending
Benchmarks / Bench (push) Waiting to run
CI on main / Format Rust Files (push) Waiting to run
CI on main / Lint Rust Files (push) Waiting to run
CI on main / Check Dependencies (push) Waiting to run
CI on main / Test (push) Waiting to run
CI on main / Test262 Coverage (push) Waiting to run
Release / Release (push) Waiting to run
Release / version (push) Blocked by required conditions
Release / Package darwin-arm64 (push) Blocked by required conditions
Release / Package darwin-x64 (push) Blocked by required conditions
Release / Package linux-arm64-musl (push) Blocked by required conditions
Release / Package linux-x64 (push) Blocked by required conditions
Release / Package linux-x64-musl (push) Blocked by required conditions
Release / Package win32-arm64 (push) Blocked by required conditions
Release / Package win32-x64 (push) Blocked by required conditions
Release / Package linux-arm64 (push) Blocked by required conditions
Release / Publish CLI (push) Blocked by required conditions
Release / Publish JS API (push) Blocked by required conditions
Repository dispatch on main / Build @biomejs/wasm-web (push) Waiting to run
Repository dispatch on main / Repository dispatch (push) Blocked by required conditions
Release / Build WASM (push) Blocked by required conditions
Release / Package JavaScript APIs (push) Blocked by required conditions
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml | ||
README.md |
biome_diagnostics_categories
This crate contains a static registry of all the diagnostic categories used throughout the Biome codebase
Code Generation
The list of categories is defined in src/categories.rs
using the
define_dategories!
macro, but instead of relying on conventional Rust macro
expansion this crate instead uses a build script (in build.rs
) to control how
the code resulting from the macro is generated.
Specifically this lets us generate new identifiers, which is something plain Rust macros cannot do, without having to use full-blown procedural macros, which would require creating and building yet another crate.