mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00
Use import alias locations for pep8-naming
import rules (#3772)
This commit is contained in:
parent
81de3a16bc
commit
e88fbae926
11 changed files with 116 additions and 98 deletions
|
@ -962,10 +962,7 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::constant_imported_as_non_constant(
|
pep8_naming::rules::constant_imported_as_non_constant(
|
||||||
stmt,
|
name, asname, alias, stmt,
|
||||||
name,
|
|
||||||
asname,
|
|
||||||
self.locator,
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -979,10 +976,7 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::lowercase_imported_as_non_lowercase(
|
pep8_naming::rules::lowercase_imported_as_non_lowercase(
|
||||||
stmt,
|
name, asname, alias, stmt,
|
||||||
name,
|
|
||||||
asname,
|
|
||||||
self.locator,
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -996,10 +990,7 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::camelcase_imported_as_lowercase(
|
pep8_naming::rules::camelcase_imported_as_lowercase(
|
||||||
stmt,
|
name, asname, alias, stmt,
|
||||||
name,
|
|
||||||
asname,
|
|
||||||
self.locator,
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -1013,10 +1004,7 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::camelcase_imported_as_constant(
|
pep8_naming::rules::camelcase_imported_as_constant(
|
||||||
stmt,
|
name, asname, alias, stmt,
|
||||||
name,
|
|
||||||
asname,
|
|
||||||
self.locator,
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -1030,10 +1018,7 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::camelcase_imported_as_acronym(
|
pep8_naming::rules::camelcase_imported_as_acronym(
|
||||||
stmt,
|
name, asname, alias, stmt,
|
||||||
name,
|
|
||||||
asname,
|
|
||||||
self.locator,
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -1344,10 +1329,10 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::constant_imported_as_non_constant(
|
pep8_naming::rules::constant_imported_as_non_constant(
|
||||||
stmt,
|
|
||||||
&alias.node.name,
|
&alias.node.name,
|
||||||
asname,
|
asname,
|
||||||
self.locator,
|
alias,
|
||||||
|
stmt,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -1361,10 +1346,10 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::lowercase_imported_as_non_lowercase(
|
pep8_naming::rules::lowercase_imported_as_non_lowercase(
|
||||||
stmt,
|
|
||||||
&alias.node.name,
|
&alias.node.name,
|
||||||
asname,
|
asname,
|
||||||
self.locator,
|
alias,
|
||||||
|
stmt,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -1378,10 +1363,10 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::camelcase_imported_as_lowercase(
|
pep8_naming::rules::camelcase_imported_as_lowercase(
|
||||||
stmt,
|
|
||||||
&alias.node.name,
|
&alias.node.name,
|
||||||
asname,
|
asname,
|
||||||
self.locator,
|
alias,
|
||||||
|
stmt,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -1395,10 +1380,10 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::camelcase_imported_as_constant(
|
pep8_naming::rules::camelcase_imported_as_constant(
|
||||||
stmt,
|
|
||||||
&alias.node.name,
|
&alias.node.name,
|
||||||
asname,
|
asname,
|
||||||
self.locator,
|
alias,
|
||||||
|
stmt,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
@ -1412,10 +1397,10 @@ where
|
||||||
{
|
{
|
||||||
if let Some(diagnostic) =
|
if let Some(diagnostic) =
|
||||||
pep8_naming::rules::camelcase_imported_as_acronym(
|
pep8_naming::rules::camelcase_imported_as_acronym(
|
||||||
stmt,
|
|
||||||
&alias.node.name,
|
&alias.node.name,
|
||||||
asname,
|
asname,
|
||||||
self.locator,
|
alias,
|
||||||
|
stmt,
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
self.diagnostics.push(diagnostic);
|
self.diagnostics.push(diagnostic);
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
use rustpython_parser::ast::Stmt;
|
use rustpython_parser::ast::{Alias, Stmt};
|
||||||
|
|
||||||
use ruff_diagnostics::{Diagnostic, Violation};
|
use ruff_diagnostics::{Diagnostic, Violation};
|
||||||
use ruff_macros::{derive_message_formats, violation};
|
use ruff_macros::{derive_message_formats, violation};
|
||||||
use ruff_python_ast::helpers::identifier_range;
|
use ruff_python_ast::types::Range;
|
||||||
use ruff_python_ast::source_code::Locator;
|
|
||||||
use ruff_python_stdlib::str::{self};
|
use ruff_python_stdlib::str::{self};
|
||||||
|
|
||||||
use crate::rules::pep8_naming::helpers;
|
use crate::rules::pep8_naming::helpers;
|
||||||
|
@ -50,23 +49,25 @@ impl Violation for CamelcaseImportedAsAcronym {
|
||||||
|
|
||||||
/// N817
|
/// N817
|
||||||
pub fn camelcase_imported_as_acronym(
|
pub fn camelcase_imported_as_acronym(
|
||||||
import_from: &Stmt,
|
|
||||||
name: &str,
|
name: &str,
|
||||||
asname: &str,
|
asname: &str,
|
||||||
locator: &Locator,
|
alias: &Alias,
|
||||||
|
stmt: &Stmt,
|
||||||
) -> Option<Diagnostic> {
|
) -> Option<Diagnostic> {
|
||||||
if helpers::is_camelcase(name)
|
if helpers::is_camelcase(name)
|
||||||
&& !str::is_lower(asname)
|
&& !str::is_lower(asname)
|
||||||
&& str::is_upper(asname)
|
&& str::is_upper(asname)
|
||||||
&& helpers::is_acronym(name, asname)
|
&& helpers::is_acronym(name, asname)
|
||||||
{
|
{
|
||||||
return Some(Diagnostic::new(
|
let mut diagnostic = Diagnostic::new(
|
||||||
CamelcaseImportedAsAcronym {
|
CamelcaseImportedAsAcronym {
|
||||||
name: name.to_string(),
|
name: name.to_string(),
|
||||||
asname: asname.to_string(),
|
asname: asname.to_string(),
|
||||||
},
|
},
|
||||||
identifier_range(import_from, locator),
|
Range::from(alias),
|
||||||
));
|
);
|
||||||
|
diagnostic.set_parent(stmt.location);
|
||||||
|
return Some(diagnostic);
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
use rustpython_parser::ast::Stmt;
|
use rustpython_parser::ast::{Alias, Stmt};
|
||||||
|
|
||||||
use ruff_diagnostics::{Diagnostic, Violation};
|
use ruff_diagnostics::{Diagnostic, Violation};
|
||||||
use ruff_macros::{derive_message_formats, violation};
|
use ruff_macros::{derive_message_formats, violation};
|
||||||
use ruff_python_ast::helpers::identifier_range;
|
use ruff_python_ast::types::Range;
|
||||||
use ruff_python_ast::source_code::Locator;
|
|
||||||
use ruff_python_stdlib::str::{self};
|
use ruff_python_stdlib::str::{self};
|
||||||
|
|
||||||
use crate::rules::pep8_naming::helpers;
|
use crate::rules::pep8_naming::helpers;
|
||||||
|
@ -47,23 +46,25 @@ impl Violation for CamelcaseImportedAsConstant {
|
||||||
|
|
||||||
/// N814
|
/// N814
|
||||||
pub fn camelcase_imported_as_constant(
|
pub fn camelcase_imported_as_constant(
|
||||||
import_from: &Stmt,
|
|
||||||
name: &str,
|
name: &str,
|
||||||
asname: &str,
|
asname: &str,
|
||||||
locator: &Locator,
|
alias: &Alias,
|
||||||
|
stmt: &Stmt,
|
||||||
) -> Option<Diagnostic> {
|
) -> Option<Diagnostic> {
|
||||||
if helpers::is_camelcase(name)
|
if helpers::is_camelcase(name)
|
||||||
&& !str::is_lower(asname)
|
&& !str::is_lower(asname)
|
||||||
&& str::is_upper(asname)
|
&& str::is_upper(asname)
|
||||||
&& !helpers::is_acronym(name, asname)
|
&& !helpers::is_acronym(name, asname)
|
||||||
{
|
{
|
||||||
return Some(Diagnostic::new(
|
let mut diagnostic = Diagnostic::new(
|
||||||
CamelcaseImportedAsConstant {
|
CamelcaseImportedAsConstant {
|
||||||
name: name.to_string(),
|
name: name.to_string(),
|
||||||
asname: asname.to_string(),
|
asname: asname.to_string(),
|
||||||
},
|
},
|
||||||
identifier_range(import_from, locator),
|
Range::from(alias),
|
||||||
));
|
);
|
||||||
|
diagnostic.set_parent(stmt.location);
|
||||||
|
return Some(diagnostic);
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
use rustpython_parser::ast::Stmt;
|
use rustpython_parser::ast::{Alias, Stmt};
|
||||||
|
|
||||||
use ruff_diagnostics::{Diagnostic, Violation};
|
use ruff_diagnostics::{Diagnostic, Violation};
|
||||||
use ruff_macros::{derive_message_formats, violation};
|
use ruff_macros::{derive_message_formats, violation};
|
||||||
use ruff_python_ast::helpers::identifier_range;
|
use ruff_python_ast::types::Range;
|
||||||
use ruff_python_ast::source_code::Locator;
|
|
||||||
use ruff_python_stdlib::str;
|
use ruff_python_stdlib::str;
|
||||||
|
|
||||||
use crate::rules::pep8_naming::helpers;
|
use crate::rules::pep8_naming::helpers;
|
||||||
|
@ -47,19 +46,21 @@ impl Violation for CamelcaseImportedAsLowercase {
|
||||||
|
|
||||||
/// N813
|
/// N813
|
||||||
pub fn camelcase_imported_as_lowercase(
|
pub fn camelcase_imported_as_lowercase(
|
||||||
import_from: &Stmt,
|
|
||||||
name: &str,
|
name: &str,
|
||||||
asname: &str,
|
asname: &str,
|
||||||
locator: &Locator,
|
alias: &Alias,
|
||||||
|
stmt: &Stmt,
|
||||||
) -> Option<Diagnostic> {
|
) -> Option<Diagnostic> {
|
||||||
if helpers::is_camelcase(name) && str::is_lower(asname) {
|
if helpers::is_camelcase(name) && str::is_lower(asname) {
|
||||||
return Some(Diagnostic::new(
|
let mut diagnostic = Diagnostic::new(
|
||||||
CamelcaseImportedAsLowercase {
|
CamelcaseImportedAsLowercase {
|
||||||
name: name.to_string(),
|
name: name.to_string(),
|
||||||
asname: asname.to_string(),
|
asname: asname.to_string(),
|
||||||
},
|
},
|
||||||
identifier_range(import_from, locator),
|
Range::from(alias),
|
||||||
));
|
);
|
||||||
|
diagnostic.set_parent(stmt.location);
|
||||||
|
return Some(diagnostic);
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
use rustpython_parser::ast::Stmt;
|
use rustpython_parser::ast::{Alias, Stmt};
|
||||||
|
|
||||||
use ruff_diagnostics::{Diagnostic, Violation};
|
use ruff_diagnostics::{Diagnostic, Violation};
|
||||||
use ruff_macros::{derive_message_formats, violation};
|
use ruff_macros::{derive_message_formats, violation};
|
||||||
use ruff_python_ast::helpers::identifier_range;
|
use ruff_python_ast::types::Range;
|
||||||
use ruff_python_ast::source_code::Locator;
|
|
||||||
use ruff_python_stdlib::str;
|
use ruff_python_stdlib::str;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
|
@ -46,19 +45,21 @@ impl Violation for ConstantImportedAsNonConstant {
|
||||||
|
|
||||||
/// N811
|
/// N811
|
||||||
pub fn constant_imported_as_non_constant(
|
pub fn constant_imported_as_non_constant(
|
||||||
import_from: &Stmt,
|
|
||||||
name: &str,
|
name: &str,
|
||||||
asname: &str,
|
asname: &str,
|
||||||
locator: &Locator,
|
alias: &Alias,
|
||||||
|
stmt: &Stmt,
|
||||||
) -> Option<Diagnostic> {
|
) -> Option<Diagnostic> {
|
||||||
if str::is_upper(name) && !str::is_upper(asname) {
|
if str::is_upper(name) && !str::is_upper(asname) {
|
||||||
return Some(Diagnostic::new(
|
let mut diagnostic = Diagnostic::new(
|
||||||
ConstantImportedAsNonConstant {
|
ConstantImportedAsNonConstant {
|
||||||
name: name.to_string(),
|
name: name.to_string(),
|
||||||
asname: asname.to_string(),
|
asname: asname.to_string(),
|
||||||
},
|
},
|
||||||
identifier_range(import_from, locator),
|
Range::from(alias),
|
||||||
));
|
);
|
||||||
|
diagnostic.set_parent(stmt.location);
|
||||||
|
return Some(diagnostic);
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
use rustpython_parser::ast::Stmt;
|
use rustpython_parser::ast::{Alias, Stmt};
|
||||||
|
|
||||||
use ruff_diagnostics::{Diagnostic, Violation};
|
use ruff_diagnostics::{Diagnostic, Violation};
|
||||||
use ruff_macros::{derive_message_formats, violation};
|
use ruff_macros::{derive_message_formats, violation};
|
||||||
use ruff_python_ast::helpers::identifier_range;
|
use ruff_python_ast::types::Range;
|
||||||
use ruff_python_ast::source_code::Locator;
|
|
||||||
use ruff_python_stdlib::str;
|
use ruff_python_stdlib::str;
|
||||||
|
|
||||||
/// ## What it does
|
/// ## What it does
|
||||||
|
@ -45,19 +44,21 @@ impl Violation for LowercaseImportedAsNonLowercase {
|
||||||
|
|
||||||
/// N812
|
/// N812
|
||||||
pub fn lowercase_imported_as_non_lowercase(
|
pub fn lowercase_imported_as_non_lowercase(
|
||||||
import_from: &Stmt,
|
|
||||||
name: &str,
|
name: &str,
|
||||||
asname: &str,
|
asname: &str,
|
||||||
locator: &Locator,
|
alias: &Alias,
|
||||||
|
stmt: &Stmt,
|
||||||
) -> Option<Diagnostic> {
|
) -> Option<Diagnostic> {
|
||||||
if !str::is_upper(name) && str::is_lower(name) && asname.to_lowercase() != asname {
|
if !str::is_upper(name) && str::is_lower(name) && asname.to_lowercase() != asname {
|
||||||
return Some(Diagnostic::new(
|
let mut diagnostic = Diagnostic::new(
|
||||||
LowercaseImportedAsNonLowercase {
|
LowercaseImportedAsNonLowercase {
|
||||||
name: name.to_string(),
|
name: name.to_string(),
|
||||||
asname: asname.to_string(),
|
asname: asname.to_string(),
|
||||||
},
|
},
|
||||||
identifier_range(import_from, locator),
|
Range::from(alias),
|
||||||
));
|
);
|
||||||
|
diagnostic.set_parent(stmt.location);
|
||||||
|
return Some(diagnostic);
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 0
|
column: 7
|
||||||
end_location:
|
end_location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 25
|
column: 25
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 1
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: ConstantImportedAsNonConstant
|
name: ConstantImportedAsNonConstant
|
||||||
body: "Constant `CONSTANT` imported as non-constant `constant`"
|
body: "Constant `CONSTANT` imported as non-constant `constant`"
|
||||||
|
@ -23,13 +25,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 36
|
column: 36
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 2
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: ConstantImportedAsNonConstant
|
name: ConstantImportedAsNonConstant
|
||||||
body: "Constant `ANOTHER_CONSTANT` imported as non-constant `another_constant`"
|
body: "Constant `ANOTHER_CONSTANT` imported as non-constant `another_constant`"
|
||||||
|
@ -37,11 +41,13 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 52
|
column: 52
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 3
|
||||||
|
column: 0
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 0
|
column: 7
|
||||||
end_location:
|
end_location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 30
|
column: 30
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 1
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: LowercaseImportedAsNonLowercase
|
name: LowercaseImportedAsNonLowercase
|
||||||
body: "Lowercase `lowercase` imported as non-lowercase `Lowercase`"
|
body: "Lowercase `lowercase` imported as non-lowercase `Lowercase`"
|
||||||
|
@ -23,13 +25,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 38
|
column: 38
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 2
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: LowercaseImportedAsNonLowercase
|
name: LowercaseImportedAsNonLowercase
|
||||||
body: "Lowercase `another_lowercase` imported as non-lowercase `AnotherLowercase`"
|
body: "Lowercase `another_lowercase` imported as non-lowercase `AnotherLowercase`"
|
||||||
|
@ -37,11 +41,13 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 53
|
column: 53
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 3
|
||||||
|
column: 0
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 0
|
column: 7
|
||||||
end_location:
|
end_location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 25
|
column: 25
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 1
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: CamelcaseImportedAsLowercase
|
name: CamelcaseImportedAsLowercase
|
||||||
body: "Camelcase `CamelCase` imported as lowercase `camelcase`"
|
body: "Camelcase `CamelCase` imported as lowercase `camelcase`"
|
||||||
|
@ -23,13 +25,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 38
|
column: 38
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 2
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: CamelcaseImportedAsLowercase
|
name: CamelcaseImportedAsLowercase
|
||||||
body: "Camelcase `AnotherCamelCase` imported as lowercase `another_camelcase`"
|
body: "Camelcase `AnotherCamelCase` imported as lowercase `another_camelcase`"
|
||||||
|
@ -37,11 +41,13 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 53
|
column: 53
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 3
|
||||||
|
column: 0
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 0
|
column: 7
|
||||||
end_location:
|
end_location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 25
|
column: 25
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 1
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: CamelcaseImportedAsConstant
|
name: CamelcaseImportedAsConstant
|
||||||
body: "Camelcase `CamelCase` imported as constant `CAMELCASE`"
|
body: "Camelcase `CamelCase` imported as constant `CAMELCASE`"
|
||||||
|
@ -23,13 +25,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 38
|
column: 38
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 2
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: CamelcaseImportedAsConstant
|
name: CamelcaseImportedAsConstant
|
||||||
body: "Camelcase `AnotherCamelCase` imported as constant `ANOTHER_CAMELCASE`"
|
body: "Camelcase `AnotherCamelCase` imported as constant `ANOTHER_CAMELCASE`"
|
||||||
|
@ -37,11 +41,13 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 3
|
row: 3
|
||||||
column: 53
|
column: 53
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 3
|
||||||
|
column: 0
|
||||||
|
|
||||||
|
|
|
@ -9,13 +9,15 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 0
|
column: 7
|
||||||
end_location:
|
end_location:
|
||||||
row: 1
|
row: 1
|
||||||
column: 22
|
column: 22
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 1
|
||||||
|
column: 0
|
||||||
- kind:
|
- kind:
|
||||||
name: CamelcaseImportedAsAcronym
|
name: CamelcaseImportedAsAcronym
|
||||||
body: "CamelCase `CamelCase` imported as acronym `CC`"
|
body: "CamelCase `CamelCase` imported as acronym `CC`"
|
||||||
|
@ -23,11 +25,13 @@ expression: diagnostics
|
||||||
fixable: false
|
fixable: false
|
||||||
location:
|
location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 0
|
column: 16
|
||||||
end_location:
|
end_location:
|
||||||
row: 2
|
row: 2
|
||||||
column: 31
|
column: 31
|
||||||
fix:
|
fix:
|
||||||
edits: []
|
edits: []
|
||||||
parent: ~
|
parent:
|
||||||
|
row: 2
|
||||||
|
column: 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue