lints and suggestions for the nix programming language
Go to file
2021-10-23 13:18:03 +05:30
bin simplify flake 2021-10-23 13:18:03 +05:30
lib add suggestion application logic 2021-10-23 12:41:30 +05:30
macros allow match_kind to accept multiple kinds 2021-10-15 13:06:29 +05:30
vfs minor refactor 2021-10-19 22:27:23 +05:30
.gitignore new lint: manual_inherit 2021-10-02 13:39:39 +05:30
Cargo.lock initial implementation of multipass code fixer 2021-10-23 12:41:52 +05:30
Cargo.toml add vfs 2021-10-19 15:57:39 +05:30
default.nix add default.nix and shell.nix with flake-compat 2021-10-19 20:46:03 +05:30
flake.lock add default.nix and shell.nix with flake-compat 2021-10-19 20:46:03 +05:30
flake.nix simplify flake 2021-10-23 13:18:03 +05:30
notes.txt fix flake builds 2021-10-19 20:39:11 +05:30
readme.md add roadmap 2021-10-15 13:07:08 +05:30
shell.nix add default.nix and shell.nix with flake-compat 2021-10-19 20:46:03 +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.

TODO

  • Offline documentation for each lint
  • Automatically fix all lints from suggestions generated
  • Test suite for lints and suggestions