erg/crates/erg_linter
2024-12-10 11:38:23 +09:00
..
Cargo.toml fix: SharedPromise::join deadlock 2024-12-10 11:38:23 +09:00
lib.rs feat: add Linter 2024-03-25 00:13:03 +09:00
lint.rs feat(lint): add hint 2024-11-25 22:53:25 +09:00
README.md feat: add Linter 2024-03-25 00:13:03 +09:00
warn.rs feat(lint): add hint 2024-11-25 22:53:25 +09:00

erg-linter (WIP)

erg-linter (can be used with erg lint) is a tool to check the erg file for errors.

Features

The following codes are warned.

  • Unreachable codes
  • Wildcard import
  • Shadowing of built-in variables
  • Procedures without side-effects
  • Variables that can be defined as constants
  • Unnecessary .clone
  • Mutable objects that do not change
  • Hardcoded well-known constants (e.g. 3.14)
  • Defining a subroutine with too many parameters
  • Defining a class with too many fields

These are warned by the compiler

  • Unused variables
  • Unused objects that are not NoneLike