rust-bitcoin / rust-bech32

Bech32 format encoding and decoding
MIT License
93 stars 49 forks source link

Introduce `semgrep` #153

Open tcharding opened 10 months ago

tcharding commented 10 months ago

This is exploratory, adds a semgrep config file with a single rule. The idea is that we could use semgrep to enforce coding patterns. The downside is it has to be done with grep so it is not general enough to enforce "all error types implement std::error::Error" - well at least not trivially AFAICT.

The added rule shows how grep'able things can be enforced.

ref: https://semgrep.dev/orgs/rust_bitcoin/settings/access

tcharding commented 10 months ago

CC @dpc for giving me the idea.

tcharding commented 7 months ago

The first patch can be removed to see this work in action.

tcharding commented 7 months ago

FTR this PR is a proof of concept for introducing semgrep everywhere. Sorry @clarkmoody this repo is fast becoming the testbed for all the rust-bitcoin tooling madness we want to introduce :)

dpc commented 7 months ago

Sorry @clarkmoody this repo is fast becoming the testbed for all the rust-bitcoin tooling madness we want to introduce :)

checks if there's flake.nix in the root dir :shrug:

tcharding commented 7 months ago

You haven't managed to convert me to nix yet :)

dpc commented 7 months ago

yet! :D