Skip to content

Commit

Permalink
Fixed short name on wrong token;
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Huch committed Nov 21, 2022
1 parent 95abe99 commit fea631b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linter_base/src/lints.scala
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ object Short_Name extends Parser_Lint

override def parser(report: Reporter): Parser[Some[Lint_Result]] =
p_command("fun", "primrec", "abbreviation", "definition", "inductive", "inductive_set") ~>
elem("ident", _.info.content.length < 2) ^^ {
elem("ident", t => t.info.is_ident && t.info.content.length < 2) ^^ {
case Text.Info(range, token) =>
report(s"""Name "${token.content}" is too short.""", range, None)
}
Expand Down

0 comments on commit fea631b

Please sign in to comment.