erg/crates/erg_linter
2023-01-15 12:03:19 +09:00
..
lint.rs Rename dir: compiler -> crates 2023-01-15 12:03:19 +09:00
mod.rs Rename dir: compiler -> crates 2023-01-15 12:03:19 +09:00
README.md Rename dir: compiler -> crates 2023-01-15 12:03:19 +09:00
warning.rs Rename dir: compiler -> crates 2023-01-15 12:03:19 +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
  • Unused variables
  • Shadowing of built-in variables
  • Unused objects that are not NoneLike
  • 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