diff options
Diffstat (limited to 'lib/src/lib.rs')
-rw-r--r-- | lib/src/lib.rs | 4 |
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"] |
2 | mod lints; | 2 | mod lints; |
3 | mod make; | 3 | mod make; |
4 | pub mod session; | ||
4 | mod utils; | 5 | mod utils; |
5 | 6 | ||
6 | pub use lints::LINTS; | 7 | pub use lints::LINTS; |
8 | use session::SessionInfo; | ||
7 | 9 | ||
8 | use rnix::{parser::ParseError, SyntaxElement, SyntaxKind, TextRange}; | 10 | use rnix::{parser::ParseError, SyntaxElement, SyntaxKind, TextRange}; |
9 | use std::{convert::Into, default::Default}; | 11 | use 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 |
223 | pub trait Rule { | 225 | pub 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, |