# See examples/bin/install-dev-tools.sh for an example script to install all # of the tools needed by this config. You can copy it into your project and # modify it as needed to only install the tools you need. exclude = ["target"] # If you install a nightly rustfmt from the project's GitHub releases # (https://github.com/rust-lang/rustfmt/releases) you can change the cmd to: # # cmd = [ "rustfmt", "--skip-children", "--unstable-features" ] # # This stops "rustfmt --check" from showing errors in main.rs or lib.rs # because of errors in files containing modules imported by main.rs/lib.rs. # # Try ubi (https://github.com/houseabsolute/ubi) for installing rustfmt and # other single-file executables. [commands.rustfmt] type = "both" include = "**/*.rs" cmd = ["rustfmt", "--edition", "2021"] lint-flags = "--check" ok-exit-codes = 0 lint-failure-exit-codes = 1 [commands.clippy] type = "lint" include = "**/*.rs" invoke = "once" path-args = "none" cmd = [ "cargo", "clippy", "--locked", "--all-targets", "--all-features", "--workspace", "--", "-D", "clippy::all", ] ok-exit-codes = 0 lint-failure-exit-codes = 101 ignore-stderr = ["Checking.+precious", "Finished.+dev", "could not compile"] [commands.omegasort-gitignore] type = "both" include = "**/.gitignore" cmd = ["omegasort", "--sort", "path", "--unique"] lint-flags = "--check" tidy-flags = "--in-place" ok-exit-codes = 0 lint-failure-exit-codes = 1 ignore-stderr = ["The .+ file is not sorted", "The .+ file is not unique"]