Commit graph

55 commits

Author SHA1 Message Date
bors
d0d5232c72 Auto merge of #6834 - hyd-dev:clippy-args, r=phansch,flip1995,oli-obk
Let Cargo track CLIPPY_ARGS

This PR makes `clippy-driver` emit `CLIPPY_ARGS` in its `dep-info` output.

Just like #6441, this allows this workflow to work:
```shell
cargo clippy # warning: empty `loop {}` wastes CPU cycles
cargo clippy -- -A clippy::empty_loop # no warnings emitted
```
But without rebuilding all dependencies.

cc https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/CLIPPY_ARGS.20is.20not.20tracked.20by.20Cargo/near/228599088

changelog: Cargo now re-runs Clippy if arguments after `--` provided to `cargo clippy` are changed.
2021-03-08 13:18:39 +00:00
hyd-dev
2d53b6b824
Move test_no_deps_ignores_path_deps_in_workspaces() out of dogfood_subprojects() 2021-03-08 18:29:36 +08:00
flip1995
5ebe6d3234
Fix dogfood test
Since clippy cannot be a workspace, we have to check the sub-crates separately
2021-03-05 11:10:29 +01:00
hyd-dev
03e72d5446
Let Cargo track CLIPPY_ARGS 2021-03-04 03:29:21 +08:00
Cameron Steffen
aef6dc23ee Add package arguments to dogfood test
This is necessary after migrating to RUSTC_WORKSPACE_WRAPPER.
2021-02-26 12:12:33 -06:00
Philipp Krones
7fa1d78c89
Revert "Pass Clippy args also trough RUSTFLAGS" 2020-12-22 19:17:59 +01:00
Eduardo Broto
cc9695543e Pass Clippy args also trough RUSTFLAGS 2020-12-13 15:43:20 +01:00
bors
a2d99259a4 Auto merge of #6188 - ebroto:primary_package, r=flip1995
Add --no-deps option to avoid running on path dependencies in workspaces

Since rust-lang/cargo#8758 has hit nightly, this allows us to address the second bullet point and [the concern related to `--fix`](https://github.com/rust-lang/cargo/issues/8143#issuecomment-619289546) in the [RUSTC_WORKSPACE_WRAPPER tracking issue](https://github.com/rust-lang/cargo/issues/8143).

As a reminder stabilizing that env var will solve #4612 (Clippy not running after `cargo check` in stable) and would allow to stabilize the `--fix` option in Clippy.

changelog: Add `--no-deps` option to avoid running on path dependencies in workspaces

Fixes #3025
2020-12-09 15:37:20 +00:00
Matthias Krüger
252083f7e0 address review comments and rebase
ci: always build with internal lints
group up internal lints in lib.rs
dogfood: we already pass --all-features, no need to enable internal-lints again
2020-11-29 23:43:23 +01:00
Matthias Krüger
2838b04487 add internal-lints feature to enable clippys internal lints (off by default) 2020-11-29 21:07:43 +01:00
Eduardo Broto
0387981f2b Add --no-deps command-line argument 2020-11-27 17:41:50 +01:00
Philipp Hansch
9b4ceee593
integration tests: Replace lazy_static with SyncLazy 2020-10-06 08:20:18 +02:00
Lzu Tao
9eb913a7e2 Fix error E0460 when compiled on Rustc repo 2020-02-09 19:02:27 +07:00
Lzu Tao
c4b4dd200c Use lazy_static 2020-02-05 16:13:55 +01:00
Lzu Tao
47abd0a217 Fix dogfood to use cargo mod too 2020-02-05 21:55:03 +07:00
Matthias Krüger
a1ecf39442 tests: dogfood: run tests with debuginfo=0 reducing dogfood target dir size even further. 2019-09-11 21:29:07 +02:00
Matthias Krüger
34dc07863d tests: execute dogfood tests with incremental compilation disabled
reduces target/ dir size of when "cago test"ing by around 2 gigs.
2019-09-11 21:29:00 +02:00
flip1995
ce2a7b0160
Disable dogfood on windows for faster build time on travis 2019-07-14 15:21:50 +02:00
Jane Lusby
0df6564d95 use clippy-preview instead of clippy in cargo 2019-04-30 18:29:25 -07:00
Michael Wright
94a6eb0695 Fix dogfood tests on Appveyor
This introduces a work-around for a bug in rustup.rs when excuting
cargo from a custom toolchain. Instead of trusting rustup to
invoke cargo from one of the release channels we just invoke
nightly cargo directly.
2019-01-26 11:10:13 +02:00
Philipp Hansch
38d4ac7cea
Remove all copyright license headers
Discussion previously happened in https://github.com/rust-lang/rust/pull/43498
2019-01-08 21:46:39 +01:00
Matthias Krüger
a9509eb598 Revert "Merge pull request #3257 from o01eg/remove-sysroot"
This reverts commit 041c49c1ed, reversing
changes made to 1df5766cbb.
2018-12-14 21:42:01 +01:00
O01eg
5113de90d1
Add sysroot gettinh code to dogfood tests. 2018-12-06 13:21:45 +03:00
Wayne Warren
0442bb9ce0 Don't change current working directory of cargo tests 2018-12-05 18:18:17 -06:00
Wayne Warren
87d517df5d Use cargo's "PROFILE" envvar and set CLIPPY_DOGFOOD 2018-12-05 18:18:17 -06:00
Wayne Warren
66251c3ece Use dogfood_runner for deterministic test ordering 2018-12-05 18:18:17 -06:00
Wayne Warren
72247d8e2e Fix dogfood tests. 2018-12-05 18:18:17 -06:00
flip1995
2953ae0702
Run rustfmt on the tests 2018-11-27 21:11:50 +01:00
Matthias Krüger
df7cff31dc clippy: fix pedantic warnings and run clippy::pedantic lints on the codebase.
Turn on pedantic lints in dogfood and base tests.

needless_bool: fix clippy::items-after-statements
redundant_pattern_matching: fix clippy::similar-names
mods.rs: fix clippy::explicit-iter-loop
returns.rs: allow clippy::cast-possible-wrap

Fixes #3172
2018-11-02 12:16:43 +01:00
Manish Goregaokar
e9c025ea70 Add license header to Rust files 2018-10-06 09:43:08 -07:00
flip1995
14335f372b
Disable dogfood until rust-lang-nursery/rustup.rs#1499 is merged 2018-09-30 12:59:15 +02:00
Matthias Krüger
41d3df7321 tests: dogfood: extend to run with --all-features and clippy::internal enabled.
Run it on rustc_tools_util and clippy_dev as well.
2018-09-26 12:32:20 +02:00
Michael Wright
6fc9d90b60 Re-enable dogfood test on Windows
This should work now that dogfood uses a separate output directory.
2018-04-03 06:22:42 +02:00
Michael Wright
1ab96db791 Make dogfood test output to seperate directory
This commit makes `cargo clippy` output the build artifacts to a
separate directory if the `CLIPPY_DOGFOOD` env var is set. This should
prevent dogfood builds from interfering with regular builds.

This should help with issue #2595.
2018-04-01 09:44:30 +02:00
Mateusz Mikuła
23bfa396a0 Format code
Signed-off-by: Mateusz Mikuła <mati865@gmail.com>
2018-03-16 10:54:49 +01:00
Oliver Schneider
920fc17485 Don't run dogfood on windows or in the rustc test suite 2018-01-19 13:14:43 +01:00
Oliver Schneider
10c96e50c3
Don't run dogfood tests in the rustc test suite 2018-01-18 22:02:58 +01:00
Oliver Schneider
8ddcb81a15
Rustup and lazy_static version mismatch fix
fixes #2274
2017-12-15 10:05:32 +01:00
Oliver Schneider
127c41f700
Apply changes that were required for running in the rustc test suite 2017-11-14 14:56:00 +01:00
topecongiro
7a06d312fd Cargo fmt 2017-11-05 04:55:56 +09:00
Oliver Schneider
e4524ac4de
Run nightly rustfmt 2017-09-05 12:39:27 +02:00
Oliver Schneider
b25b6b3355
Rustfmt 2017-08-14 09:43:26 +02:00
Oliver Schneider
9b3ea4264f Update to latest compiletest version 2017-08-02 18:07:05 +02:00
Oliver Schneider
74c776585c Move all our tests back to ui tests 2017-08-01 17:54:21 +02:00
Oliver Schneider
fdbc62dd4f Use the workspace target directory 2017-05-17 15:21:57 +02:00
mcarton
984e15a0c0
Forbid default warnings in dogfood 2016-10-22 16:16:55 +02:00
kennytm
5f09020e90 Added a lint_without_lint_pass lint.
Four lints were missing from LintPass, making them unavailable unless the
`clippy` lint group is explicitly enabled:

* `for_loop_over_result`
* `for_loop_over_option`
* `match_overlapping_arm`
* `filter_next`
2016-09-01 15:07:37 +08:00
Oliver Schneider
dec3250ad6
don't run clippy on itself twice in travis 2016-08-08 17:33:41 +02:00
Oliver Schneider
02c46f057f
add an internal lint that catches misordered paths 2016-07-18 11:19:33 +02:00
mcarton
90453fd893
Run rustfmt
Only partially apply suggestions.
2016-06-10 00:08:14 +02:00