#lint #substrate #projects #error #linting #analysis #gotchas

nightly app substrace

a tool for linting Substrate projects for specific gotchas and other errors

2 unstable releases

0.2.0 Dec 14, 2022
0.1.0 May 23, 2022

#725 in Cargo plugins

Download history 1/week @ 2024-09-17 15/week @ 2024-09-24 20/week @ 2024-10-01

60 downloads per month

MIT/Apache

160KB
3K SLoC

Substrace: Experimental Static Analysis for Substrate Projects

Substrace is a tool for linting substrate projects for specific gotchas and other errors.

Installing

Install through cargo install substrace. Run using cargo substrace.

Content

Currently the following lints are used:

  • missing_security_doc: checks for the presence Security headers on storage maps using suspicious hashing functions, such as Twox64Concat.

More lints will be added in the future, initially targetting checks that ensure storage consistencies. Currently in the works:

  • panics: ensures that clippy has been properly configured to avoid panics in code.
  • storage_iter_insert: checks that storage isn't simultaniously being mutated whilst iteration is active.

Dependencies

~8–17MB
~287K SLoC