Commit Graph

4945 Commits

Author SHA1 Message Date
Lucas Lois
3930148059 Adds inequality cases to bool comparison lint
The lint now checks cases like `y != true`
2018-12-03 16:32:11 -03:00
Philipp Hansch
c669727df4
Merge pull request #3471 from matthiaskrgr/mamor_warn
remove macro_at_most_once_rep feature attribute since it's stable
2018-11-30 10:20:24 +01:00
Matthias Krüger
c38bac89e9 remove macro_at_most_once_rep feature attribute since it's stable
Warning was:
warning: the feature `macro_at_most_once_rep` has been stable since 1.32.0 and no longer requires an attribute to enable
  --> clippy_lints/src/lib.rs:19:12
   |
19 | #![feature(macro_at_most_once_rep)]
   |            ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(stable_features)] on by default
2018-11-30 09:14:18 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
f5831523d3
Merge pull request #3465 from flip1995/rustfmt
rustfmt everything once and for all
2018-11-28 16:19:55 +01:00
Philipp Krones
a03ce65134
Merge pull request #3466 from phansch/clippy_rfc_readme
Update docs in regards to the merged RFC
2018-11-28 15:40:44 +01:00
Philipp Krones
33c1e3c08c
Add missing word
Co-Authored-By: phansch <dev@phansch.net>
2018-11-28 14:39:25 +01:00
Philipp Hansch
93e8c9efc9
Update docs in regards to the merged RFC 2018-11-28 08:11:28 +01:00
Philipp Hansch
ab5b75ae86
Merge pull request #3464 from flip1995/no_fork_integration
Don't run integration tests in forks
2018-11-28 07:19:49 +01:00
flip1995
14d1e8d174
Document how to run rustfmt in CONTRIBUTING.md 2018-11-27 22:38:15 +01:00
flip1995
27a69bd66c
Don't run integration tests in forks 2018-11-27 22:19:52 +01:00
flip1995
63fa5d24e1
Fix some formatting issues 2018-11-27 21:49:09 +01:00
flip1995
1751d2496d
Run rustfmt on clippy_lints 2018-11-27 21:14:15 +01:00
flip1995
5c5e8cc942
Run rustfmt on build.rs 2018-11-27 21:13:26 +01:00
flip1995
f9c0e2a4cb
Run rustfmt on clippy_dev 2018-11-27 21:13:08 +01:00
flip1995
3befd86967
Run rustfmt on rustc_tools_util 2018-11-27 21:12:38 +01:00
flip1995
d71c871568
Run rustfmt on src 2018-11-27 21:12:13 +01:00
flip1995
2953ae0702
Run rustfmt on the tests 2018-11-27 21:11:50 +01:00
flip1995
4e0938d349
Let travis run cargo fmt --all -- --check 2018-11-27 21:11:05 +01:00
flip1995
ccff495b62
Error on line overflow 2018-11-27 20:46:11 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
b2601beb35
Merge pull request #3459 from flip1995/sugg_appl
Add Applicability to suggestion lints: Take 2
2018-11-27 18:29:33 +01:00
flip1995
87e72a5861
Fix NAIVE_BYTECOUNT applicability 2018-11-27 17:31:17 +01:00
flip1995
6eb8e6d7c5
Fix dogfood error 2018-11-27 16:59:52 +01:00
flip1995
adc638ef33
Change Applicability of MISTYPED_LITERAL_SUFFIX 2018-11-27 16:59:39 +01:00
flip1995
4e74eef6e9
Add applicability level to (nearly) every span_lint_and_sugg function 2018-11-27 15:29:23 +01:00
flip1995
0c6483bf21
Update stderr file 2018-11-27 15:29:23 +01:00
flip1995
3740da203b
Fix bugs and improve documentation
Some bugs and some documentation is unrelated to the Applicability change, but
these bugs were serious and the documentation was kind of required to
understand what's going on.
2018-11-27 15:29:23 +01:00
flip1995
9096269610
Add Applicability::Unspecified to span_lint_and_sugg functions 2018-11-27 15:29:23 +01:00
flip1995
fad267c3b3
Introduce snippet_with_applicability and hir_with_applicability functions 2018-11-27 15:29:14 +01:00
Philipp Krones
dec389a5ee
Merge pull request #3412 from matthiaskrgr/readme_2
readme: tell how to install clippy on travis from git if it is not shipped with a nightly.
2018-11-26 14:31:48 +01:00
Matthias Krüger
2a1c8b1db6 readme: tell how to install clippy on travis from git if it is not shipped with a nightly. 2018-11-26 14:07:21 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
1e2291c90c
Merge pull request #3365 from gnieto/lint/slow-initialization
Add slow vector initializations lint
2018-11-26 13:37:46 +01:00
Philipp Hansch
03498fd502
Merge pull request #3456 from matthiaskrgr/builtin
constants: add u128 i128 builtin types and fix outdated url
2018-11-26 07:19:14 +01:00
Matthias Krüger
ae32c877a5 constants: add u128 i128 builtin types and fix outdated url 2018-11-26 01:12:12 +01:00
Guillem Nieto
dc35841be4 Update lints 2018-11-25 14:36:04 -08:00
Guillem Nieto
5fa04bc3cd Lint only the first statment/expression after alloc
Instead of searching for all the successive expressions after a vector
allocation, check only the first expression.

This is done to minimize the amount of false positives of the lint.
2018-11-25 14:34:23 -08:00
Guillem Nieto
39b02fdcd2 Fix some warnings related to Self 2018-11-25 14:34:23 -08:00
Guillem Nieto
5b77ee95dc Rename some symbols
Renamed some symbols in order to make them a little bit more accurate.
2018-11-25 14:34:23 -08:00
Guillem Nieto
2753f1cbd4 Split lint into slow and unsafe vector initalization 2018-11-25 14:34:23 -08:00
Guillem Nieto
9b4bc3b6ef Add unsafe set_len initialization 2018-11-25 14:34:23 -08:00
Guillem Nieto
e0ccc9d9af Add slow zero-filled vector initialization lint
Add lint to detect slow zero-filled vector initialization. It detects
when a vector is zero-filled with extended with `repeat(0).take(len)`
or `resize(len, 0)`.
This zero-fillings are usually slower than simply using `vec![0; len]`.
2018-11-25 14:34:23 -08:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
69d09fbfc6
Merge pull request #3439 from dtolnay/npbv
Downgrade needless_pass_by_value to allow by default
2018-11-24 10:16:38 +01:00
Philipp Hansch
3e68a89dd0
Merge pull request #3453 from phansch/remove_sudo_false
Travis: Remove `sudo: false`
2018-11-23 22:13:50 +01:00
Philipp Hansch
ce4f3010ec
Travis: Remove sudo: false 2018-11-23 21:47:02 +01:00
Philipp Hansch
754b4c0723
Merge pull request #3452 from matthiaskrgr/rustup
rustup https://github.com/rust-lang/rust/pull/54071/
2018-11-23 10:38:20 +01:00
Matthias Krüger
311c8e29b1 rustup https://github.com/rust-lang/rust/pull/54071/ 2018-11-23 10:05:51 +01:00
Philipp Hansch
61501b2810
Merge pull request #3449 from matthiaskrgr/dep
dependencies: update pulldown-cmark from 0.1 to 0.2
2018-11-22 18:54:09 +01:00
Matthias Krüger
1ee0c1a029 dependencies: update pulldown-cmark from 0.1 to 0.2 2018-11-22 18:04:34 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
ff7da3264e
Merge pull request #3447 from phansch/small_rename
s/file_map/source_map
2018-11-22 15:08:13 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
2f6881c623
Merge pull request #3442 from rust-lang/version_ids
Enable rustup clippy to refer to the correct documentation
2018-11-22 10:46:08 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
87ec0580f9
Merge branch 'master' into version_ids 2018-11-22 10:22:25 +01:00