Merge pull request #3036 from TheBlueMatt/2024-05-filter-color
[rust-lightning] / ci / rustfmt.sh
1 #!/bin/bash
2 set -eox pipefail
3
4 # Generate initial exclusion list
5 #find . -name '*.rs' -type f |sort >rustfmt_excluded_files
6
7 # Run fmt
8 TMP_FILE=$(mktemp)
9 find . -name '*.rs' -type f |sort >$TMP_FILE
10 for file in $(comm -23 $TMP_FILE rustfmt_excluded_files); do
11         echo "Checking formatting of $file"
12         rustfmt +1.63.0 --check $file
13 done