about summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
2021-05-10Rollup merge of #85096 - clarfonthey:const_unchecked, r=oli-obkDylan DPC-2/+12
Make unchecked_{add,sub,mul} inherent methods unstably const The intrinsics are marked as being stably const (even though they're not stable by nature of being intrinsics), but the currently-unstable inherent versions are not marked as const. This fixes this inconsistency. Split out of #85017, r? `@oli-obk`
2021-05-09Fix `Step` feature flag, make tidy lint more useful to find things like thisltdk-2/+12
2021-05-07Rollup merge of #84872 - bjorn3:cg_clif_tidy, r=Mark-SimulacrumDylan DPC-47/+136
Wire up tidy dependency checks for cg_clif Also contains a fix and improvement to tidy. Required for https://github.com/rust-lang/rust/pull/81746.
2021-05-05Add `yansi-term` as a permitted dependencyJoshua Nelson-0/+2
2021-05-03Wire up tidy dependency checks for cg_clifbjorn3-21/+113
2021-05-03Take build dependencies into account during license checksbjorn3-10/+1
The comment says that build dependencies shouldn't matter unless they do some kind of codegen. It is safer to always check it though.
2021-05-03Remove obsolete crate exceptionsbjorn3-15/+0
2021-05-03Fix RESTRICTED_DEPENDENCY_CRATES to list rustc_driver instead of rustc_middlebjorn3-1/+22
2021-04-28Rollup merge of #84531 - Smittyvb:foo-not-feature, r=Mark-SimulacrumJack Huey-0/+9
Ignore commented out lines when finding features This fixes #76246, where commented out lines were being detected as features by `tidy`, by ignoring those lines when looking for features. It's still not perfect, since it can be fooled by things like: ```rust /* #[unstable(feature = "foo", issue = "1234")] */ ``` But luckily that never happens in `rustc`, so `foo` now ceases to appear in the unstable book.
2021-04-29Fix tidy platform-specific code checkChristiaan Dirkx-48/+28
2021-04-25Add starting anchorSmittyvb-1/+1
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2021-04-24Ignore commented out lines when finding featuresSmitty-0/+9
2021-04-23Remove arrayref, constant_time_eq from depsJubilee Young-2/+0
2021-04-18Auto merge of #84065 - c410-f3r:tests-tests-tests, r=petrochenkovbors-1/+1
Move some tests to more reasonable directories - 6 cc #73494 r? `@petrochenkov` git mv bad/bad-const-type.* static/ git mv bad/bad-crate-name.* extern git mv bad/bad-env-capture* fn/ git mv bad/bad-expr-lhs.* expr/ git mv bad/bad-expr-path* expr/ git mv bad/bad-extern-link-attrs.* extern/ git mv bad/bad-intrinsic-monomorphization.* intrinsics/ git mv bad/bad-lint-cap* lint/ git mv bad/bad-main.* fn git mv bad/bad-method-typaram-kind.* type/ git mv bad/bad-mid-path-type-params.* fn git mv bad/bad-module.* modules/ git mv bad/bad-sized.* type/ git mv bad/bad-type-env-capture.* fn
2021-04-17Move some tests to more reasonable directories - 6Caio-1/+1
2021-04-11tidy: Re-enable the "ignoring file length unnecessarily" checkSimon Jakobi-5/+3
Closes #77548.
2021-04-05Rollup merge of #83878 - the8472:fix-concurrent-tidy-access, r=Mark-SimulacrumDylan DPC-0/+1
Fix racing file access in tidy That should fix the failure in https://github.com/rust-lang/rust/pull/83776#issuecomment-813311289 The file is only created for a brief moment during the bins checks in the source directories while other checks may also be visiting the same directory. By skipping it we avoid file not found errors.
2021-04-05don't try to visit probe fileThe8472-0/+1
this file is only created for a brief moment during the bins checks in the source directories while other checks may also be visiting that directory. skip processing it to avoid missing file errors
2021-04-05Remove unnecessary exceptions to the platform-specific code checkJoshua Nelson-22/+0
Some of these were just wrong, like src/librustc. Some looked outdated, like std::f64. Not sure what was going on with the others - maybe this check isn't as smart as it needs to be? But it the meantime it seems silly to ignore the check if it will pass anyway.
2021-04-04Auto merge of #83530 - Mark-Simulacrum:bootstrap-bump, r=Mark-Simulacrumbors-2/+0
Bump bootstrap to 1.52 beta This includes the standard bump, but also a workaround for new cargo behavior around clearing out the doc directory when the rustdoc version changes.
2021-04-04Bump cfgsMark Rousskov-2/+0
2021-04-04Fix error codes check run and ensure it will not go unnoticed againGuillaume Gomez-13/+29
2021-04-04Auto merge of #82347 - the8472:parallelize-tidy, r=Mark-Simulacrumbors-104/+187
Parallelize tidy Split off from #81833 While that PR brings wall time of `x.py test tidy` down to 0m2.847s adding this one on top should bring it down to 0m1.673s. r? `@Mark-Simulacrum` Previous concerns can be found at https://github.com/rust-lang/rust/pull/81833#issuecomment-782754685 and https://github.com/rust-lang/rust/pull/81833#discussion_r575194633
2021-04-04perform filesystem probe once before running bins checks concurrentlyThe8472-80/+110
this avoids concurrent write attempts to the output directory
2021-04-03tidy: Add ignore-rules for the line length checkAnthony Huang-6/+30
This is step 1 towards fixing #77548. This commit includes the tidy change from #77675. The "ignoring file length unnecessarily" check is temporarily disabled to simplify landing the ignore-rules. That check will be re-enabled in a follow-up PR.
2021-03-27Rollup merge of #83239 - JohnTitor:reduce-deps, r=Mark-SimulacrumYuki Okushi-2/+0
Remove/replace some outdated crates from the dependency tree - Remove `cloudabi` by updating `parking_lot` to 0.11.1. - Replace `packed_simd` with `packed_simd2` by updating `bytecount` to 0.6.2.
2021-03-21Rollup merge of #83289 - c410-f3r:tests-tests-tests, r=petrochenkovDylan DPC-2/+2
Move some tests to more reasonable directories - 5 cc #73494 Threshold is 0.95. Next time I promise I will take a look into the special/misclassified directories. - [issues/issue-23208.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-23208.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/23208)</sup>: associated-types 0.951 - [weird-exprs.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/weird-exprs.rs) <sup>unknown</sup>: destructuring-assignment 0.958 - [issues/issue-1701.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-1701.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/1701)</sup>: structs-enums 0.974 - [issues/issue-48508-aux.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-48508-aux.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/48508)</sup>: numbers-arithmetic 0.991 - [fn_must_use.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/fn_must_use.rs) <sup>unknown</sup>: lint 1.000 - [mir_check_nonconst.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/mir_check_nonconst.rs) <sup>unknown</sup>: consts 1.002 - [issues/issue-52060.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-52060.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/52060)</sup>: consts 1.017 - [issues/issue-45729-unsafe-in-generator.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-45729-unsafe-in-generator.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/45729)</sup>: generator 1.024 - [issues/issue-10392.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10392.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/10392)</sup>: pattern 1.039 - [no-implicit-prelude.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/no-implicit-prelude.rs) <sup>unknown</sup>: resolve 1.071 - [issues/issue-68000-unicode-ident-after-missing-comma.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-68000-unicode-ident-after-missing-comma.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/68000)</sup>: parser 1.079 - [shadow.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/shadow.rs) <sup>unknown</sup>: binding 1.099 - [issues/issue-65611.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-65611.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/65611)</sup>: consts 1.139 - [concat-rpass.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/concat-rpass.rs) <sup>unknown</sup>: macros 1.194 - [issues/issue-31597.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-31597.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/31597)</sup>: associated-types 1.195 - [issues/issue-78372.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-78372.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/78372)</sup>: resolve 1.426 - [impl-trait-in-bindings-issue-73003.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-trait-in-bindings-issue-73003.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/73003)</sup>: impl-trait 1.471 - [impl-trait-in-bindings.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-trait-in-bindings.rs) <sup>unknown</sup>: impl-trait 2.500 r? `@petrochenkov`
2021-03-20Move some tests to more reasonable directories - 5Caio-2/+2
2021-03-18Upgrade memmap to memmap2 in other crates.Camille GILLOT-0/+1
2021-03-18`cargo update -p parking_lot -p parking_lot_core`Yuki Okushi-2/+0
Changelog: https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md#parking_lot_core-083-2021-02-12 The full log: ``` Removing cloudabi v0.1.0 Updating parking_lot v0.11.0 -> v0.11.1 Updating parking_lot_core v0.8.0 -> v0.8.3 ```
2021-03-08Move rustdoc UI tests into a subdirectoryJoshua Nelson-1/+1
This also adds a little leeway to the test limit.
2021-03-06Move some tests to more suitable subdirsYuki Okushi-1/+1
2021-03-03Auto merge of #82553 - tmiasko:update-tracing, r=Mark-Simulacrumbors-0/+1
Update tracing to 0.1.25 * Update tracing from 0.1.18 to 0.1.25 * Update tracing-subscriber from 0.2.13 to 0.2.16 * Update tracing-tree from 0.1.6 to 0.1.8 * Add pin-project-lite to the list of allowed dependencies (it is now a direct dependency of tracing).
2021-03-01limit tidy parallelism by taking -j into accountThe8472-2/+19
2021-03-01parallelize tidy checksThe8472-39/+75
2021-03-01Rollup merge of #82507 - jyn514:tidy-windows, r=Mark-SimulacrumYuki Okushi-0/+5
Rename the `tidy` binary to `rust-tidy` This avoids naming collisions, particularly on Windows where the dynamic library variable is PATH and setting it causes the in-tree `tidy` to take precedence over the HTML tidy used by compiletest. This doesn't change the x.py interface in any way, it still accepts `x.py test tidy` and prints error messages about `tidy`. It only changes the name of the file on disk. Fixes https://github.com/rust-lang/rust/issues/82501.
2021-02-28Update tracing to 0.1.25Tomasz Miąsko-0/+1
2021-02-27Rollup merge of #82537 - wesleywiser:update_measureme, r=oli-obkDylan DPC-0/+1
Update measureme dependency to the latest version This version adds the ability to use `rdpmc` hardware-based performance counters instead of wall-clock time for measuring duration. This also introduces a dependency on the `perf-event-open-sys` crate on Linux which is used when using hardware counters. r? ```@oli-obk```
2021-02-27Rollup merge of #82057 - upsuper-forks:cstr, r=davidtwco,wesleywiserDylan DPC-0/+1
Replace const_cstr with cstr crate This PR replaces the `const_cstr` macro inside `rustc_data_structures` with `cstr` macro from [cstr](https://crates.io/crates/cstr) crate. The two macros basically serve the same purpose, which is to generate `&'static CStr` from a string literal. `cstr` is better because it validates the literal at compile time, while the existing `const_cstr` does it at runtime when `debug_assertions` is enabled. In addition, the value `cstr` generates can be used in constant context (which is seemingly not needed anywhere currently, though).
2021-02-26Rollup merge of #81940 - jhpratt:stabilize-str_split_once, r=m-ou-seGuillaume Gomez-1/+1
Stabilize str_split_once Closes #74773
2021-02-25Update measureme dependency to the latest versionWesley Wiser-0/+1
This version adds the ability to use `rdpmc` hardware-based performance counters instead of wall-clock time for measuring duration. This also introduces a dependency on the `perf-event-open-sys` crate on Linux which is used when using hardware counters.
2021-02-24Rename the `tidy` binary to `rust-tidy`Joshua Nelson-0/+5
This avoids naming collisions, particularly on Windows where the dynamic library variable is PATH and setting it causes the in-tree `tidy` to take precedence over the HTML tidy used by compiletest.
2021-02-24library: Normalize safety-for-unsafe-block commentsMiguel Ojeda-1/+1
Almost all safety comments are of the form `// SAFETY:`, so normalize the rest and fix a few of them that should have been a `/// # Safety` section instead. Furthermore, make `tidy` only allow the uppercase form. While currently `tidy` only checks `core`, it is a good idea to prevent `core` from drifting to non-uppercase comments, so that later we can start checking `alloc` etc. too. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-02-18Rollup merge of #82203 - c410-f3r:tests-tests-tests, r=Dylan-DPCYuki Okushi-2/+2
Move some tests to more reasonable directories - 4 cc #81941
2021-02-16Move some tests to more reasonable directoriesCaio-2/+2
2021-02-14Replace const_cstr with cstr crateXidorn Quan-0/+1
2021-02-09Stabilize str_split_onceJacob Pratt-1/+1
2021-02-09remove unused backtrace refsCaleb Cartwright-1/+0
2021-02-04tidy: Run tidy style against markdown files.Eric Huss-20/+47
2021-01-31Move some tests to more reasonable directoriesCaio-1/+1