flip1995
a922f800af
Run update_lints and fmt
2019-08-05 13:24:31 +02:00
Vincent Dal Maso
77b21b644f
Move expression check to LateLintPass
...
Changes:
- Move from EarlyLintPass
- Fix entrypoint check with function path def_id.
2019-08-05 13:23:30 +02:00
flip1995
e6a836e2e8
Move UNNECESSARY_UNWRAP to complexity and PANICKING_UNWRAP to correctness
2019-08-01 15:14:06 +02:00
xd009642
925e8207fa
Respond to review comments
...
Update README and CHANGELOG using the util scripts, refine the help message and fix the float_cmp error.
2019-07-27 21:58:29 +01:00
Matthias Krüger
a865fe607c
rustup https://github.com/rust-lang/rust/pull/62679/
2019-07-19 16:41:10 +02:00
Darth-Revan
b7145fbb66
Fix "unkown clippy lint" error in UI test.
2019-07-17 08:58:36 +02:00
Darth-Revan
0513202d25
Implement lint for inherent to_string() method.
2019-07-17 08:58:32 +02:00
bors
a73bb33399
Auto merge of #4273 - mikerite:deny-warnings, r=flip1995
...
Deny warnings in CI
changelog: none
2019-07-15 07:51:29 +00:00
Michael Wright
b523d35d41
Deny warnings in CI
2019-07-15 07:35:02 +02:00
flip1995
c100c70822
Build sys_root in driver with PathBuf instead of String
2019-07-13 12:48:42 +02:00
Jeremy Stucki
c7da4c26fb
Implement flat_map lint
2019-07-08 17:11:54 +02:00
Joe Frikker
1e6c6976dd
PR comments
2019-06-23 18:02:13 -04:00
Joe Frikker
60a80849ce
Adding try_err lint
2019-06-22 16:37:05 -04:00
David Tolnay
f88a387c3f
Downgrade integer_division to restriction
2019-06-15 00:17:04 -07:00
flip1995
0e480ca4bc
Use replace_region_in_file for creating the lint list
2019-06-14 13:07:33 +02:00
Jane Lusby
2719c1e6a3
minor fix
2019-06-12 12:29:37 -07:00
Jane Lusby
a2bf96f1c6
make it pass dogfood
2019-06-12 12:29:37 -07:00
Jane Lusby
113ae891d9
run rustfmt
2019-06-12 12:29:37 -07:00
Jane Lusby
73259d68db
fix padding and put clippy someplaces
2019-06-12 12:29:37 -07:00
Jane Lusby
cfd7e0d5fd
show default lint levels
2019-06-12 12:29:37 -07:00
Jane Lusby
07ccec86a5
group printing
2019-06-12 12:29:37 -07:00
Jane Lusby
296794dec5
prelim arg parse
2019-06-12 12:29:37 -07:00
Jane Lusby
5abcff2be5
move Lint static def into its own module
2019-06-12 12:29:37 -07:00
Jane Lusby
f6367c41dc
switch to sorted usable lints
2019-06-12 12:29:37 -07:00
Jane Lusby
cf88c8487a
initial commit for help improvements on clippy-driver
2019-06-12 12:29:37 -07:00
Matthias Krüger
6967cf59a4
clippy-driver: use rustc_tools_util to get version info.
...
This will add git hash information to `clippy-driver -V` output.
2019-05-01 10:43:16 +02:00
Matthias Krüger
414c34c300
rustup 41316f0449
2019-04-01 20:37:05 +02:00
Félix Fischer
491f72442e
Updated source to match with recent rustc master
toolchain changes
2019-04-01 20:37:05 +02:00
Philipp Hansch
c730de955e
Remove some unused features and error-pattern
s
2019-03-12 08:15:50 +01:00
Alexander Regueiro
d43966a176
Various cosmetic improvements.
2019-03-10 18:06:28 +00:00
John Kåre Alsaker
1388f2488e
rustfmt
2019-03-10 12:00:17 +01:00
John Kåre Alsaker
0d4a19c0d1
Use the new rustc interface
2019-03-10 11:10:05 +01:00
Michael Wright
c9d79c0c5e
Remove #[feature(try_from)]
...
`try_from` is now stable.
2019-02-26 08:43:47 +02:00
Grzegorz
16881390e1
removing redundant closures in the whole project
2019-02-10 13:35:44 +01:00
Jeremy Fitzhardinge
993e8ace8e
Drive-by cleanups to cargo-clippy. No functional change.
2019-02-02 11:43:21 -08:00
Jeremy Fitzhardinge
71d03ae29b
clippy-driver: if --sysroot is specified on the command line, use that
...
If the user explicitly sets sysroot on the command line, then use that
value.
Issue #3663
2019-02-02 11:43:21 -08:00
Jeremy Fitzhardinge
b5fd0108b3
clippy-driver: more robust test to see if we're clippy-enabled
...
Rather than looking for a fixed --emit arg set, just check to see
if we're emitting metadata at all. This makes it more robust to
being invoked by tools other than cargo (or if cargo changes its
invocation).
Issue #3663
2019-02-02 11:43:20 -08:00
Araam Borhanian
1169066a0b
Adding lint for too many lines.
2019-02-01 13:21:19 -05:00
Matthias Krüger
e9e0a7e3bd
rustup https://github.com/rust-lang/rust/pull/57726
2019-01-27 01:42:34 +01: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
5f0617b92f
update CARGO_CLIPPY_HELP string to suggest tool lints.
2018-12-25 17:11:57 +01:00
Alex Crichton
b5f6eb6e75
Link to rustc_driver
crate in plugin
...
This is in anticipation for rust-lang/rust#56987 where the
`rustc_driver` crate being linked in will be required to link correctly
against the compiler. In the meantime it should be harmless otherwise!
2018-12-19 15:05:41 -08:00
bors
980bcd8c53
Auto merge of #3546 - matthiaskrgr:fix_install, r=oli-obk
...
Revert "Merge pull request #3257 from o01eg/remove-sysroot"
This reverts commit 041c49c1ed
, reversing
changes made to 1df5766cbb
.
The PR broke running a cargo-install'd clippy.
The installed clippy would not be able to find a crate for std.
Fixes #3523
Reopens #2874
2018-12-19 12:54:47 +00:00
flip1995
0516c2e04a
Move renaming to the right place
2018-12-17 13:58:41 +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
69813d6faf
Don't try to determine sysroot. rustc_driver will use default value.
2018-12-06 12:23:39 +03:00
flip1995
d71c871568
Run rustfmt on src
2018-11-27 21:12:13 +01:00
Matthias Krüger
3a11cd4289
remove unused allow() attributes, NFC
2018-11-17 13:47:46 +01:00
Oliver Scherer
9d3373137b
Remove now-useless allow(unknown_lints)
2018-10-11 12:18:27 +02:00
Oliver Scherer
b8654eaa6c
Stabilize tool lints
2018-10-11 12:16:22 +02:00
Devon Hollowood
eef2e8948b
Fix cast_possible_truncation warnings
2018-10-08 21:40:21 -07:00
Manish Goregaokar
e9c025ea70
Add license header to Rust files
2018-10-06 09:43:08 -07:00
O01eg
8695c2c34b
Allow to debug rustc_driver via logs.
2018-10-03 21:41:02 +03:00
Eduard-Mihai Burtescu
9219fc6c5c
Reintroduce extern crate
for non-Cargo dependencies.
2018-09-15 11:10:51 +03:00
flip1995
f49f133cba
Fix pedantic filter_map warnings
2018-09-14 12:56:25 +02:00
Matthias Krüger
fa11aad92a
print git commit hash and commit date in version output
...
clippy 0.0.212 (964fcbe0 2018-09-06)
2018-09-06 14:45:12 +02:00
Michael Wright
4f7a260472
driver: Improve check for rustc arg
...
The rustc arg might not be exactly "rustc". It may be any path to a rustc
executable (especially if the RUSTC environment variable is set when
executing cargo). Rather check that it is a path with 'rustc' file stem.
2018-09-06 07:01:56 +02:00
flip1995
daa4f0ad34
Implement backwards compatibility changes introduced by rust-lang/rust#53762
2018-08-29 11:08:29 -07:00
flip1995
f3bb161f0e
Adapt codebase to the tool_lints
2018-08-29 11:08:29 -07:00
Oliver Schneider
caa59e2e27
Use the compilers exit code computation instead of rolling our own
2018-08-26 15:57:17 +02:00
Matthias Krüger
8ab16b678c
remove macro_vis_matcher feature gate since it is stable now.
...
Warning was:
warning: the feature `macro_vis_matcher` has been stable since 1.29.0 and no longer requires an attribute to enable
--> src/lib.rs:4:12
|
4 | #![feature(macro_vis_matcher)]
| ^^^^^^^^^^^^^^^^^
|
= note: #[warn(stable_features)] on by default
2018-08-23 15:40:51 +02:00
Manish Goregaokar
a7bea134d3
Remove implied rust_2018 feature
...
We are already on the edition and this feature is implied.
2018-08-19 19:14:47 -07:00
Michael Wright
bbd67c9b78
Fix #2927
2018-08-15 08:11:07 +02:00
Oliver Schneider
afd91248ed
Rustup
2018-07-23 13:01:12 +02:00
Oliver Schneider
ff0e5f967f
Rewrite the print/write macro checks as a PreExpansionPass
2018-07-23 00:19:07 +02:00
Mateusz Mikuła
a6601f2d02
Enable rust_2018_idioms warning
2018-06-25 20:56:25 +02:00
Fraser Hutchison
5be00bcd18
Ensure a non-zero value is returned by clippy if compilation fails
2018-06-21 05:20:14 +01:00
Mateusz Mikuła
b45fb35ec4
Cleanup of driver code
2018-06-07 22:13:24 +02:00
Mateusz Mikuła
52deb3b086
Prepare for upcoming breakage
2018-06-07 19:16:41 +02:00
Mateusz Mikuła
26f3feb980
Add rust_2018_preview feature and fix rustfmt annotation
2018-05-30 10:10:01 +02:00
Mateusz Mikuła
3c6503eb4b
Format code
2018-05-22 10:21:42 +02:00
Oliver Schneider
b60ffa780d
Stop compilation after linting
2018-05-19 18:49:57 +02:00
utam0k
df1b7c5f19
Rename trans to codegen
2018-05-19 14:29:20 +09:00
Oliver Schneider
fd8a1d20cc
Remove all mention and testing of #[plugin(clippy)] and warn if used
2018-05-11 13:20:39 +02:00
Philipp Hansch
a854874e6a
Fix latest nightly breakage
...
I'm not sure if there are better ways to use the RwLock API, though. But
it seems to work.
2018-04-18 20:25:43 +02:00
Manish Goregaokar
399488079b
argh
2018-04-04 19:15:22 -07:00
Manish Goregaokar
ab28118449
Fix driver dogfood bug
2018-04-04 18:56:21 -07:00
Michael Wright
a8bb8925cb
Fix clippy warning
2018-04-04 07:08:35 +02:00
Michael Wright
add4434ee3
Support non-unicode paths for dogfood test
2018-04-02 09:28:08 +02:00
Michael Wright
609dd47410
Fix clippy warnings from last commit
2018-04-01 10:18:05 +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
Benjamin Gill
8db845c189
Delete all code for handling manifest path
...
Now that we're using cargo check, we can stop needing to find out the
manifest path ourselves. Instead, we can delegate to cargo check, which
is perfectly capable of working out for itself what needs to be built.
This fixes #1707 and #2518 .
Note that this PR will change the output. We will no longer output `bin:
foo` before each crate. This a bit unfortunate. However, given that
we're now going to be building in parallel (which is *much* faster), I
think this is acceptable - we'll be no worse than cargo itself.
2018-03-28 23:27:49 +01:00
Oliver Schneider
66a98d2658
Use cargo check instead of cargo rustc
2018-03-28 11:50:17 +02:00
Oliver Schneider
9b10c4be8c
Undo current_dir -> CARGO_MANIFEST_DIR move
2018-03-27 13:00:02 +02:00
Oliver Schneider
96d5af36f8
Version bump
2018-03-27 12:14:46 +02:00
Oliver Schneider
bef1afac5b
Undo a temporary fix for a cargo bug
...
Fixes #2566
2018-03-25 08:52:00 +02:00
Oliver Schneider
47a706682c
Version bump
2018-03-19 09:26:05 +01: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
21f387d278
Update dependencies
2018-03-13 16:54:13 +01:00
TomasKralCZ
42120141bd
Suggestion fixed, simplified lint logic.
2018-02-12 11:26:00 +01:00
Seiichi Uchida
a2fec0e3e3
Rustup to rustc 1.25.0-nightly ( 97520ccb1
2018-01-21)
2018-01-22 13:23:57 +09:00
Oliver Schneider
26f83d6218
Readd the .exe extension on windows
2018-01-19 13:14:44 +01:00
Manish Goregaokar
3c4f5bfae2
Use rustc_driver::run ( fixes #2303 )
...
This internally uses monitor() which catches panics and stuff
2018-01-17 14:04:42 +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
47be692723
Merge pull request #2194 from martinlindhe/master
...
fix some typos
2017-11-02 10:30:10 +01:00
topecongiro
6fc9fe2eba
Fix a typo
2017-11-02 07:18:34 +09:00
topecongiro
49392fce53
Avoid panicking when no arg is given to clippy_driver
2017-11-02 07:13:14 +09:00