]> git.bitcoin.ninja Git - rust-lightning/commit
Only attempt to `rustfmt` files checked into git 2024-09-local-ci-rustfmt
authorMatt Corallo <git@bluematt.me>
Wed, 18 Sep 2024 18:03:11 +0000 (18:03 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 18 Sep 2024 18:04:54 +0000 (18:04 +0000)
commit930f5fbf9a11f87131f2fcf8d32b6849b2832456
tree7145ab7fcfbfff4b8a41a31f09a2f979df51a31d
parentcdd1298a38a71eb24b2e1fe719212f645aea5bf0
Only attempt to `rustfmt` files checked into git

This avoids `rustfmt` failing on Rust files generated by dependent
crates in `target`, eg

```
+ rustfmt --edition 2021 --check ./target/debug/build/thiserror-8230374e07b5c05a/out/probe.rs
Diff in /home/matt/rust-lightning-3/target/debug/build/thiserror-8230374e07b5c05a/out/probe.rs at line 1:

-    #![feature(provide_any)]
+#![feature(provide_any)]

-    use std::any::{Demand, Provider};
+use std::any::{Demand, Provider};

-    fn _f<'a, P: Provider>(p: &'a P, demand: &mut Demand<'a>) {
-        p.provide(demand);
-    }
+fn _f<'a, P: Provider>(p: &'a P, demand: &mut Demand<'a>) {
+ p.provide(demand);
+}
```
ci/rustfmt.sh
contrib/run-rustfmt.sh
rustfmt_excluded_files