mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 12:14:43 +00:00
chore(linter): use line!()
This commit is contained in:
parent
339b27400d
commit
d0f534360f
2 changed files with 3 additions and 1 deletions
|
@ -230,6 +230,7 @@ impl Linter {
|
||||||
if record.len() >= MAX_INSTANCE_ATTRIBUTES {
|
if record.len() >= MAX_INSTANCE_ATTRIBUTES {
|
||||||
self.warns.push(too_many_instance_attributes(
|
self.warns.push(too_many_instance_attributes(
|
||||||
self.input(),
|
self.input(),
|
||||||
|
line!() as usize,
|
||||||
self.caused_by(),
|
self.caused_by(),
|
||||||
expr.loc(),
|
expr.loc(),
|
||||||
));
|
));
|
||||||
|
|
|
@ -21,6 +21,7 @@ pub(crate) fn too_many_params(input: Input, caused_by: String, loc: Location) ->
|
||||||
|
|
||||||
pub(crate) fn too_many_instance_attributes(
|
pub(crate) fn too_many_instance_attributes(
|
||||||
input: Input,
|
input: Input,
|
||||||
|
errno: usize,
|
||||||
caused_by: String,
|
caused_by: String,
|
||||||
loc: Location,
|
loc: Location,
|
||||||
) -> CompileWarning {
|
) -> CompileWarning {
|
||||||
|
@ -42,7 +43,7 @@ pub(crate) fn too_many_instance_attributes(
|
||||||
ErrorCore::new(
|
ErrorCore::new(
|
||||||
vec![SubMessage::ambiguous_new(loc, vec![], Some(hint))],
|
vec![SubMessage::ambiguous_new(loc, vec![], Some(hint))],
|
||||||
msg,
|
msg,
|
||||||
0,
|
errno,
|
||||||
ErrorKind::AttributeWarning,
|
ErrorKind::AttributeWarning,
|
||||||
loc,
|
loc,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue