4 # Generate initial exclusion list
5 #find . -name '*.rs' -type f |sort >rustfmt_excluded_files
7 # The +rustversion syntax only works with rustup-installed rust toolchains,
8 # not with any distro-provided ones. Thus, we check for a rustup install and
9 # only pass +1.63.0 if we find one.
11 [ "$(which rustup)" != "" ] && VERS="+1.63.0"
15 find . -name '*.rs' -type f |sort >$TMP_FILE
16 for file in $(comm -23 $TMP_FILE rustfmt_excluded_files); do
17 echo "Checking formatting of $file"
18 rustfmt $VERS --check $file