aboutsummaryrefslogtreecommitdiff
path: root/lib/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/lib.rs')
-rw-r--r--lib/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/src/lib.rs b/lib/src/lib.rs
index a25b814..cc4818a 100644
--- a/lib/src/lib.rs
+++ b/lib/src/lib.rs
@@ -1,9 +1,11 @@
1#![recursion_limit = "1024"] 1#![recursion_limit = "1024"]
2mod lints; 2mod lints;
3mod make; 3mod make;
4pub mod session;
4mod utils; 5mod utils;
5 6
6pub use lints::LINTS; 7pub use lints::LINTS;
8use session::SessionInfo;
7 9
8use rnix::{parser::ParseError, SyntaxElement, SyntaxKind, TextRange}; 10use rnix::{parser::ParseError, SyntaxElement, SyntaxKind, TextRange};
9use std::{convert::Into, default::Default}; 11use std::{convert::Into, default::Default};
@@ -221,7 +223,7 @@ impl Serialize for Suggestion {
221/// Lint logic is defined via this trait. Do not implement manually, 223/// Lint logic is defined via this trait. Do not implement manually,
222/// look at the `lint` attribute macro instead for implementing rules 224/// look at the `lint` attribute macro instead for implementing rules
223pub trait Rule { 225pub trait Rule {
224 fn validate(&self, node: &SyntaxElement) -> Option<Report>; 226 fn validate(&self, node: &SyntaxElement, sess: &SessionInfo) -> Option<Report>;
225} 227}
226 228
227/// Contains information about the lint itself. Do not implement manually, 229/// Contains information about the lint itself. Do not implement manually,