@@ -32,8 +32,8 @@ impl RegistryVisitor for LintRulesVisitor {
32
32
}
33
33
34
34
pub fn generate_rules_configuration ( mode : Mode ) -> Result < ( ) > {
35
- let linter_config_root = project_root ( ) . join ( "crates/pg_configuration /src/analyser/linter" ) ;
36
- let push_rules_directory = project_root ( ) . join ( "crates/pg_configuration /src/generated" ) ;
35
+ let linter_config_root = project_root ( ) . join ( "crates/pglt_configuration /src/analyser/linter" ) ;
36
+ let push_rules_directory = project_root ( ) . join ( "crates/pglt_configuration /src/generated" ) ;
37
37
38
38
let mut lint_visitor = LintRulesVisitor :: default ( ) ;
39
39
pglt_analyser:: visit_registry ( & mut lint_visitor) ;
@@ -102,8 +102,8 @@ fn generate_for_groups(
102
102
103
103
let severity_fn = if kind == RuleCategory :: Action {
104
104
quote ! {
105
- /// Given a category coming from [Diagnostic](pg_diagnostics ::Diagnostic), this function returns
106
- /// the [Severity](pg_diagnostics ::Severity) associated to the rule, if the configuration changed it.
105
+ /// Given a category coming from [Diagnostic](pglt_diagnostics ::Diagnostic), this function returns
106
+ /// the [Severity](pglt_diagnostics ::Severity) associated to the rule, if the configuration changed it.
107
107
/// If the severity is off or not set, then the function returns the default severity of the rule:
108
108
/// [Severity::Error] for recommended rules and [Severity::Warning] for other rules.
109
109
///
@@ -133,8 +133,8 @@ fn generate_for_groups(
133
133
} else {
134
134
quote ! {
135
135
136
- /// Given a category coming from [Diagnostic](pg_diagnostics ::Diagnostic), this function returns
137
- /// the [Severity](pg_diagnostics ::Severity) associated to the rule, if the configuration changed it.
136
+ /// Given a category coming from [Diagnostic](pglt_diagnostics ::Diagnostic), this function returns
137
+ /// the [Severity](pglt_diagnostics ::Severity) associated to the rule, if the configuration changed it.
138
138
/// If the severity is off or not set, then the function returns the default severity of the rule:
139
139
/// [Severity::Error] for recommended rules and [Severity::Warning] for other rules.
140
140
///
@@ -173,20 +173,20 @@ fn generate_for_groups(
173
173
let use_rule_configuration = if kind == RuleCategory :: Action {
174
174
quote ! {
175
175
use crate :: analyser:: { RuleAssistConfiguration , RuleAssistPlainConfiguration } ;
176
- use pg_analyse :: { options:: RuleOptions , RuleFilter } ;
176
+ use pglt_analyse :: { options:: RuleOptions , RuleFilter } ;
177
177
}
178
178
} else {
179
179
quote ! {
180
180
use crate :: analyser:: { RuleConfiguration , RulePlainConfiguration } ;
181
- use pg_analyse :: { options:: RuleOptions , RuleFilter } ;
181
+ use pglt_analyse :: { options:: RuleOptions , RuleFilter } ;
182
182
}
183
183
} ;
184
184
185
185
let groups = if kind == RuleCategory :: Action {
186
186
quote ! {
187
187
#use_rule_configuration
188
188
use biome_deserialize_macros:: Merge ;
189
- use pg_diagnostics :: { Category , Severity } ;
189
+ use pglt_diagnostics :: { Category , Severity } ;
190
190
use rustc_hash:: FxHashSet ;
191
191
use serde:: { Deserialize , Serialize } ;
192
192
#[ cfg( feature = "schema" ) ]
@@ -226,7 +226,7 @@ fn generate_for_groups(
226
226
}
227
227
228
228
impl Actions {
229
- /// Checks if the code coming from [pg_diagnostics ::Diagnostic] corresponds to a rule.
229
+ /// Checks if the code coming from [pglt_diagnostics ::Diagnostic] corresponds to a rule.
230
230
/// Usually the code is built like {group}/{rule_name}
231
231
pub fn has_rule(
232
232
group: RuleGroup ,
@@ -266,7 +266,7 @@ fn generate_for_groups(
266
266
quote ! {
267
267
#use_rule_configuration
268
268
use biome_deserialize_macros:: Merge ;
269
- use pg_diagnostics :: { Category , Severity } ;
269
+ use pglt_diagnostics :: { Category , Severity } ;
270
270
use rustc_hash:: FxHashSet ;
271
271
use serde:: { Deserialize , Serialize } ;
272
272
#[ cfg( feature = "schema" ) ]
@@ -314,7 +314,7 @@ fn generate_for_groups(
314
314
}
315
315
316
316
impl Rules {
317
- /// Checks if the code coming from [pg_diagnostics ::Diagnostic] corresponds to a rule.
317
+ /// Checks if the code coming from [pglt_diagnostics ::Diagnostic] corresponds to a rule.
318
318
/// Usually the code is built like {group}/{rule_name}
319
319
pub fn has_rule(
320
320
group: RuleGroup ,
@@ -380,7 +380,7 @@ fn generate_for_groups(
380
380
RuleCategory :: Lint => {
381
381
quote ! {
382
382
use crate :: analyser:: linter:: * ;
383
- use pg_analyse :: { AnalyserRules , MetadataRegistry } ;
383
+ use pglt_analyse :: { AnalyserRules , MetadataRegistry } ;
384
384
385
385
pub fn push_to_analyser_rules(
386
386
rules: & Rules ,
@@ -404,7 +404,7 @@ fn generate_for_groups(
404
404
RuleCategory :: Action => {
405
405
quote ! {
406
406
use crate :: analyser:: assists:: * ;
407
- use pg_analyse :: { AnalyserRules , MetadataRegistry } ;
407
+ use pglt_analyse :: { AnalyserRules , MetadataRegistry } ;
408
408
409
409
pub fn push_to_analyser_assists(
410
410
rules: & Actions ,
@@ -534,7 +534,7 @@ fn generate_group_struct(
534
534
#rule
535
535
} ) ;
536
536
let rule_option_type = quote ! {
537
- pg_analyser :: options:: #rule_name
537
+ pglt_analyser :: options:: #rule_name
538
538
} ;
539
539
let rule_option = if kind == RuleCategory :: Action {
540
540
quote ! { Option <#rule_config_type<#rule_option_type>> }
0 commit comments