How StaticLint performs static code analysis
masterStaticLint provides functionality similar to LanguageServer.jl by performing a single pass over a project's Syntax Tree (ST). The analysis process involves:
- Linking the file tree: Mapping the project structure.
- Scope marking: Identifying namespaces within the ST.
- Binding marking: Identifying variable bindings (functions, instances, etc.).
- Identifier linking: Connecting variable names to their relevant bindings.
- Error detection: Marking possible errors within the ST (which relies on the previous four steps).
To perform a pass over a single EXPR (expression), you call a State object on the ST. This State requires an AbstractServer to determine how files are loaded and how packages are made available.