about summary refs log tree commit diff
path: root/src/tools/tidy
AgeCommit message (Collapse)AuthorLines
2020-04-27No need to whitelist E0750 anymoreGuillaume Gomez-1/+1
2020-04-22Add checks to ensure that explanations have code examples using the error ↵Guillaume Gomez-15/+74
code and also that 'compile_fail' isn't mispelled
2020-04-05tidy: Update rustc-ap-syntax to -rustc_astIgor Matuszewski-1/+1
2020-04-02Add hash of source files in debug infoArlo Siemsen-1/+10
* Adds either an MD5 or SHA1 hash to the debug info. * Adds new unstable option `-Z src-hash-algorithm` to control the hashing algorithm.
2020-03-30rustc -> rustc_middle part 4 -- pacify tidyMazdak Farrokhzad-1/+1
2020-03-19Rollup merge of #69443 - ehuss:tidy-license, r=skade,Mark-SimulacrumMazdak Farrokhzad-340/+356
tidy: Better license checks. This implements some improvements to the license checks in tidy: * Use `cargo_metadata` instead of parsing vendored crates. This allows license checks to run without vendoring enabled, and allows the checks to run on PR builds. * Check for stale entries. * Check that the licenses for exceptions are what we think they are. * Verify exceptions do not leak into the runtime. Closes #62618 Closes #62619 Closes #63238 (I think) There are some substantive changes here. The follow licenses have changed from the original comments: * openssl BSD+advertising clause to Apache-2.0 * pest MPL2 to MIT/Apache-2.0 * smallvec MPL2 to MIT/Apache-2.0 * clippy lints MPL2 to MIT OR Apache-2.0
2020-03-13Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrumbors-0/+2
Optimize catch_unwind to match C++ try/catch This refactors the implementation of catching unwinds to allow LLVM to inline the "try" closure directly into the happy path, avoiding indirection. This means that the catch_unwind implementation is (after this PR) zero-cost unless a panic is thrown. https://rust.godbolt.org/z/cZcUSB is an example of the current codegen in a simple case. Notably, the codegen is *exactly the same* if `-Cpanic=abort` is passed, which is clearly not great. This PR, on the other hand, generates the following assembly: ```asm # -Cpanic=unwind: push rbx mov ebx,0x2a call QWORD PTR [rip+0x1c53c] # <happy> mov eax,ebx pop rbx ret mov rdi,rax call QWORD PTR [rip+0x1c537] # cleanup function call call QWORD PTR [rip+0x1c539] # <unfortunate> mov ebx,0xd mov eax,ebx pop rbx ret # -Cpanic=abort: push rax call QWORD PTR [rip+0x20a1] # <happy> mov eax,0x2a pop rcx ret ``` Fixes #64224, and resolves #64222.
2020-03-12tidy: Remove chalk-engine/chalk-macros.Eric Huss-2/+0
Removed in #69247 while this PR was waiting to merge.
2020-03-12tidy: Sort WHITELIST.Eric Huss-1/+1
2020-03-12tidy: Add `test` to RUNTIME_CRATES.Eric Huss-1/+1
2020-03-12tidy: Add some clarifying comments in license checks.Eric Huss-0/+5
2020-03-12tidy: Verify the runtime crates don't have license exceptions.Eric Huss-6/+57
2020-03-12tidy: check the licenses don't changeEric Huss-36/+60
2020-03-12tidy: Check if exceptions are no longer used.Eric Huss-12/+23
2020-03-12tidy: Use cargo_metadata for license checks.Eric Huss-308/+235
2020-03-11Rollup merge of #69603 - chrissimpkins:tidy-docs-update, r=petrochenkovMazdak Farrokhzad-2/+2
tidy: replace `make check` with `./x.py test` in documentation This PR includes a minor documentation update for tidy. It replaces the `make check` approach with `./x.py test` and describes how to execute the tidy checks (only) with ~~`./x.py test src/tools/tidy`~~ `./x.py test tidy`.
2020-03-09update tidy documentation to recommend ./x.py test tidyChris Simpkins-1/+1
2020-03-08Rollup merge of #69561 - JohnTitor:clean-up-unstable-book, r=Mark-SimulacrumMazdak Farrokhzad-30/+2
Clean up unstable book - #58402's feature was renamed to `tidy_test_never_used_anywhere_else` and it is now used for tidy only - `read_initializer` link is wrong and the doc should be auto-generated so removed - Add dummy doc for `link_cfg` - Stop generating `compiler_builtins_lib` doc in favor of b8ccc0f8a60ac16fdc00f4b2e36e1a5db8b78295 - Make `rustc_attrs` tracking issue "None"
2020-03-06fix various typosMatthias Krüger-1/+1
2020-03-02Ignore PAL lint for std::panickingMark Rousskov-0/+2
2020-02-29[tidy] update documentation from `make check` to `x.py test`Chris Simpkins-2/+2
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29Stop generating `compiler_builtins_lib` docYuki Okushi-30/+2
2020-02-13Update books.Eric Huss-0/+1
2020-02-10submodules: update cargo from 9d32b7b01 to 3c53211c3Matthias Krüger-0/+1
Changes: ```` Update jobserver. Update tar. Emit report on error with Ztimings. Do not run `formats_source` if `rustfmt` is not available Fix rebuild_sub_package_then_while_package on HFS. Remove likely brittle test. Install rustfmt for testing in CI Fix build-std collisions. Fix BuildScriptOutput when a build script is run multiple times. Fix required-features using renamed dependencies. Fix using global options before an alias. Update changelog for 1.42. Bump to 0.44.0. Log rustfmt output if it fails; also do not check that rustfmt exists Update pretty_env_logger requirement from 0.3 to 0.4 Swap std::sync::mpsc channel with crossbeam_channel Fix tests on Linux/MacOS Fix typo. Add tests Deduplicate warnings about missing rustfmt Log entry 2: first implementation Refactor code Stabilize config-profile. Log entry 1 Format code Remove tempdir after install Keep existing package with git install Use non-ephemeral workspace Test that git install reads virtual manifest Fix failing test Search for root manifest with ephemeral workspaces Support out-dir in build section of Cargo configuration file ````
2020-01-29Use termize instead of term_sizeJohn Kåre Alsaker-1/+1
2020-01-21tidy: fix most clippy warningsMatthias Krüger-7/+7
2020-01-03Implement uncommon_codepoints lint.Charles Lew-0/+2
2019-12-26Add unicode-normalization to whitelist.Charles Lew-0/+1
2019-12-24Silence line length warningsMark Rousskov-3/+18
rustfmt tries its best already, we should not fight with it.
2019-12-22Format the worldMark Rousskov-506/+481
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-5/+13
2019-12-14Auto merge of #67136 - oli-obk:const_stability, r=Centrilbors-0/+1
Require stable/unstable annotations for the constness of all stable fns with a const modifier r? @RalfJung @Centril Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.
2019-12-13Compiler internal error codes need no documentationOliver Scherer-0/+3
2019-12-13Require stable/unstable annotations for the constness of all stable ↵Oliver Scherer-2/+0
functions with a `const` modifier
2019-12-11rustc: Link LLVM directly into rustc againAlex Crichton-0/+1
This commit builds on #65501 continue to simplify the build system and compiler now that we no longer have multiple LLVM backends to ship by default. Here this switches the compiler back to what it once was long long ago, which is linking LLVM directly to the compiler rather than dynamically loading it at runtime. The `codegen-backends` directory of the sysroot no longer exists and all relevant support in the build system is removed. Note that `rustc` still supports a dynamically loaded codegen backend as it did previously, it just no longer supports dynamically loaded codegen backends in its own sysroot. Additionally as part of this the `librustc_codegen_llvm` crate now once again explicitly depends on all of its crates instead of implicitly loading them through the sysroot. This involved filling out its `Cargo.toml` and deleting all the now-unnecessary `extern crate` annotations in the header of the crate. (this in turn required adding a number of imports for names of macros too). The end results of this change are: * Rustbuild's build process for the compiler as all the "oh don't forget the codegen backend" checks can be easily removed. * Building `rustc_codegen_llvm` is much simpler since it's simply another compiler crate. * Managing the dependencies of `rustc_codegen_llvm` is much simpler since it's "just another `Cargo.toml` to edit" * The build process should be a smidge faster because there's more parallelism in the main rustc build step rather than splitting `librustc_codegen_llvm` out to its own step. * The compiler is expected to be slightly faster by default because the codegen backend does not need to be dynamically loaded. * Disabling LLVM as part of rustbuild is still supported, supporting multiple codegen backends is still supported, and dynamic loading of a codegen backend is still supported.
2019-11-30tidy: adjust feature gating pathMazdak Farrokhzad-1/+1
2019-11-27Rollup merge of #66777 - GuillaumeGomez:tidy-err-codes, r=Mark-SimulacrumTyler Mandry-2/+13
Put back tidy check on error codes I just realized that the tidy checks were not run anymore on the error code long explanations. This add it back. cc @Dylan-DPC r? @Mark-Simulacrum
2019-11-27Put back tidy check on error codesGuillaume Gomez-3/+13
2019-11-26Rollup merge of #66717 - dtolnay:tidy, r=Mark-SimulacrumTyler Mandry-3/+6
tidy: Accommodate rustfmt's preferred layout of stability attributes Previously tidy would require that the `feature = "name_of_feature"` part of the stability attribute was on the same line as the `#[stable(` / `#[unstable(` opening part of the attribute, and that `)]` was on the same line as the last key-value pair. That didn't work with rustfmt's preferred layout of long attributes, which is like: ```rust #[unstable( feature = "c_variadic", reason = "the `c_variadic` feature has not been properly tested on \ all supported platforms", issue = "44930" )] ```
2019-11-25Auto merge of #66739 - pietroalbini:rollup-2t2pd4a, r=pietroalbinibors-1/+0
Rollup of 7 pull requests Successful merges: - #65613 (Preserve whitespace inside one-backtick codeblocks) - #66512 (Add unix::process::CommandExt::arg0) - #66569 (GitHub Actions: preparations, part 1) - #66678 (Remove useless line for error index generation) - #66684 (Drive-by cleanup in region naming) - #66694 (Add some comments to panic runtime) - #66698 (tidy: Remove unused import) Failed merges: r? @ghost
2019-11-25Update cargo, rls, books.Eric Huss-0/+1
2019-11-24tidy: Accommodate rustfmt's preferred layout of stability attributesDavid Tolnay-3/+6
Previously tidy would require that the `feature = "name_of_feature"` part of the stability attribute was on the same line as the `#[stable(` / `#[unstable(` opening part of the attribute, and that `)]` was on the same line as the last key-value pair. That didn't work with rustfmt's preferred layout of long attributes, which is like: #[unstable( feature = "c_variadic", reason = "the `c_variadic` feature has not been properly tested on \ all supported platforms", issue = "44930" )]
2019-11-24tidy: Remove unused importVadim Petrochenkov-1/+0
2019-11-21Update tidy check for error codes testingGuillaume Gomez-19/+49
2019-11-12Fix mdbook-linkcheck license checks.Eric Huss-0/+3
2019-11-06Have tidy ensure that we document all `unsafe` blocks in libcoreOliver Scherer-0/+17
2019-10-30Remove references to now unused `E0526`Dylan MacKenzie-1/+0
It remains as a comment in `error_codes.rs` for consistency with other unused errors.
2019-10-22Merge branch 'master' into rusty-hermitStefan Lankes-1/+26
2019-10-21Remove `src/llvm-emscripten` submoduleAlex Crichton-1/+0
With #65251 landed there's no need to build two LLVM backends and ship them with rustc, every target we have now uses the same LLVM backend! This removes the `src/llvm-emscripten` submodule and additionally removes all support from rustbuild for building the emscripten LLVM backend. Multiple codegen backend support is left in place for now, and this is intended to be an easy 10-15 minute win on CI times by avoiding having to build LLVM twice.