Commit Graph

11 Commits

Author SHA1 Message Date
Alex Macleod
2811effe34 Add imports_granularity = "Module" to rustfmt.toml 2023-07-13 12:44:57 +00:00
Samuel Tardieu
a701af45cb lintcheck: use multithreading unless --fix or --recursive is used 2023-03-08 22:29:57 +01:00
Samuel Tardieu
79829d8718 lintcheck: use clap's derive interface
This makes the code shorter and clearer.

The only incompatible change is that an explicit command-line argument
`--crates-toml=` will take precedence over the `LINTCHECK_TOML`
environment variable.
2023-03-04 23:17:27 +01:00
Samuel Tardieu
446ae429a6 lintcheck: fix parallel processing handling
Using `rayon::current_num_threads()` causes a bug:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
  ThreadPoolBuildError { kind: GlobalPoolAlreadyInitialized }',
  src/main.rs:632:10
```

Moreover, using the number of threads and dividing it by 2 wouldn't
return the number of physical threads on modern processors which have
a varying number of threads per core.

It makes little sense to restrict ourselves to physical threads,
especially when, in modern architectures, cores with multiple threads
are often faster (performance) while cores with a unique threads are
often slower (efficient). The Rust runtime will make a better choice.
2023-03-04 17:29:58 +01:00
Samuel Tardieu
aeaa1cc342 lintcheck: fix clap panic 2023-02-12 14:54:14 +01:00
Samuel Moelius
bbee1c9d1f Apply manual fixes 2022-10-22 07:42:41 -04:00
Samuel Moelius
e38bb1a963 Apply --fix fixes 2022-10-22 07:42:35 -04:00
Alex Macleod
fc77d91469 Add cargo lintcheck --recursive to check dependencies of crates 2022-09-24 12:01:08 +00:00
Jason Newcomb
cccc750046 Fix clap deprecation warnings 2022-06-13 21:57:17 -04:00
Marcel Hellwig
9b55ea78c8 update dependencies 2022-05-23 09:28:49 +02:00
Alex Macleod
8708a261a1 Some lintcheck cleanup 2022-05-12 13:46:58 +01:00