diff --git a/build.rs b/build.rs index 27ec5f3b7aa5f..e95c5cf853f8e 100644 --- a/build.rs +++ b/build.rs @@ -21,7 +21,7 @@ const ALLOWED_CFGS: &[&str] = &[ "libc_ctest", // Corresponds to `__USE_TIME_BITS64` in UAPI "linux_time_bits64", - "musl_v1_2_3" + "musl_v1_2_3", ]; // Extra values to allow for check-cfg. diff --git a/ci/style.sh b/ci/style.sh index 44e371583e84e..0d4a4f953dda1 100755 --- a/ci/style.sh +++ b/ci/style.sh @@ -59,13 +59,9 @@ done < "$tmpfile" rm "$tmpfile" -if shellcheck --version ; then - # FIXME(ctest): update ctest scripts so we don't need to exclude them - find . -name '*.sh' -not -path './ctest/*' -print0 | xargs -0 shellcheck -else - echo "shellcheck not found" - exit 1 -fi +# Run once from workspace root to get everything that wasn't handled as an +# individual file. +cargo fmt # Ensure that `sort` output is not locale-dependent export LC_ALL=C @@ -88,3 +84,10 @@ for file in libc-test/semver/*.txt; do exit 1 fi done + +if shellcheck --version ; then + find . -name '*.sh' -print0 | xargs -0 shellcheck +else + echo "shellcheck not found" + exit 1 +fi diff --git a/ctest-test/tests/all.rs b/ctest-test/tests/all.rs index 064dde057fbb3..b8f29e6799737 100644 --- a/ctest-test/tests/all.rs +++ b/ctest-test/tests/all.rs @@ -199,4 +199,3 @@ fn test_invalid_include_path() { assert!(err.is_err(), "Expected error with invalid include path"); } - diff --git a/ctest/src/lib.rs b/ctest/src/lib.rs index 0b0e7d357001d..54912fc715f7a 100644 --- a/ctest/src/lib.rs +++ b/ctest/src/lib.rs @@ -13,9 +13,6 @@ #![recursion_limit = "256"] #![deny(missing_docs)] -use anyhow::{anyhow, Context, Result}; -use garando_syntax as syntax; -use indoc::writedoc; use std::collections::{HashMap, HashSet}; use std::env; use std::fs::File; @@ -23,6 +20,10 @@ use std::io::prelude::*; use std::io::BufWriter; use std::path::{Path, PathBuf}; use std::rc::Rc; + +use anyhow::{anyhow, Context, Result}; +use garando_syntax as syntax; +use indoc::writedoc; use syntax::abi::Abi; use syntax::ast; use syntax::ast::{Attribute, Name}; diff --git a/src/windows/mod.rs b/src/windows/mod.rs index f364af54be49f..dfee0df55c8f7 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -386,7 +386,12 @@ extern "C" { #[link_name = "_get_timezone"] pub fn get_timezone(seconds: *mut c_long) -> errno_t; #[link_name = "_get_tzname"] - pub fn get_tzname(p_return_value: *mut size_t, time_zone_name: *mut c_char, size_in_bytes: size_t, index: c_int) -> errno_t; + pub fn get_tzname( + p_return_value: *mut size_t, + time_zone_name: *mut c_char, + size_in_bytes: size_t, + index: c_int, + ) -> errno_t; #[link_name = "_localtime64_s"] pub fn localtime_s(tmDest: *mut tm, sourceTime: *const time_t) -> crate::errno_t; #[link_name = "_time64"]