lints and suggestions for the nix programming language
Go to file
2021-10-02 13:39:39 +05:30
bin rename to statix, skip self env arg 2021-10-02 10:50:15 +05:30
lib new lint: manual_inherit 2021-10-02 13:39:39 +05:30
macros add error code and report codegen, document a bit 2021-09-21 20:51:20 +05:30
.gitignore new lint: manual_inherit 2021-10-02 13:39:39 +05:30
Cargo.lock new lint: empty-let-in 2021-10-02 10:51:27 +05:30
Cargo.toml restructure repo into bin, lib and macros 2021-09-11 21:18:09 +05:30
flake.lock update docs; nix-analyzer -> statix 2021-10-02 13:39:39 +05:30
flake.nix update docs; nix-analyzer -> statix 2021-10-02 13:39:39 +05:30
readme.md update docs; nix-analyzer -> statix 2021-10-02 13:39:39 +05:30

statix

statix intends to be a static analysis tool for the Nix programming language.

For the time-being, statix works only with ASTs produced by the rnix-parser crate and does not evaluate any nix code (imports, attr sets etc.).

Architecture

statix has the following components:

  • bin: the CLI/entrypoint
  • lib: library of lints and utilities to define these lints
  • macros: procedural macros to help define a lint

bin

This is the main point of interaction between statix and the end user. It's output is human-readable and should also support JSON/errorfmt outputs for external tools to use.

lib

A library of AST-based lints and utilities to help write those lints. It should be easy for newcomers to write lints without being familiar with the rest of the codebase.

macros

This crate intends to be a helper layer to declare lints and their metadata.