Skip to content

Commit

Permalink
docs(macros): add #![warn(missing_docs] to oxc_macros (#6710)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac committed Oct 21, 2024
1 parent af25752 commit 34b6221
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/oxc_macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Macros for declaring lints and secret scanners.
#![warn(missing_docs)]
use proc_macro::TokenStream;
use syn::parse_macro_input;

Expand Down Expand Up @@ -99,6 +101,10 @@ pub fn declare_oxc_lint_test(input: TokenStream) -> TokenStream {
declare_oxc_lint::declare_oxc_lint(metadata)
}

/// Declare all lint rules in a single macro. This create the `RuleEnum` struct,
/// which is effectively a compile-time v-table for all lint rules. This
/// bypasses object-safety requirements and allows for compile-time dispatch
/// over a heterogeneous set of known lint rules.
#[proc_macro]
pub fn declare_all_lint_rules(input: TokenStream) -> TokenStream {
let metadata = parse_macro_input!(input as declare_all_lint_rules::AllLintRulesMeta);
Expand Down

0 comments on commit 34b6221

Please sign in to comment.