mcarton
ddf84ea845
Fix typos
2016-08-24 14:37:09 +02:00
mcarton
be329ebdf7
Typo
...
TIL what `wether` means.
2016-08-23 19:51:42 +02:00
mcarton
9a2aadf872
Deny missing_docs_in_private_items
in some modules
2016-08-23 19:39:36 +02:00
mcarton
8b12e28e43
in_macro
check in MISSING_DOCS_IN_PRIVATE_ITEMS
2016-08-23 19:00:56 +02:00
mcarton
36d8ca04a1
Add a MISSING_DOCS_IN_PRIVATE_ITEMS
lint
2016-08-23 18:28:39 +02:00
mcarton
507b626b36
Add zero_prefixed_literal
lint
2016-08-23 18:15:12 +02:00
llogiq
cf2b0c8dd6
New cmp_null lint ( fixes #1184 ) ( #1186 )
...
* new cmp_null lint (fixes #1184 )
* adressed comments (still fails)
* fixed tests, dogfood, ran update_lints
2016-08-22 18:29:29 +02:00
Oliver Schneider
14d2cd0b0a
unused_import
is a valid lint to be changed on use
statements
2016-08-19 17:27:24 +02:00
Oliver Schneider
2d57902a27
don't lint if snippet is shortert than 1 character
...
This happens with various combinations of cfg attributes and macros expansion.
Not linting here is the safe route, as everything else might produce false positives.
2016-08-19 17:27:24 +02:00
Georg Brandl
ff919376a6
rustup
2016-08-18 21:24:35 +02:00
Oliver Schneider
40720a61e8
rustup for the ! type
2016-08-17 17:58:15 +02:00
mcarton
a34beedfe5
Add "DirectX" and "OpenGL" to doc_valid_idents
2016-08-17 15:46:33 +02:00
Oliver Schneider
3ab6ad59c4
disallow lint attributes on use
and extern crate
items
2016-08-17 11:36:04 +02:00
Georg Brandl
ffad9a8c8c
Lint print!("...\n") ( closes #455 )
2016-08-16 20:52:48 +02:00
Oliver Schneider
b6f320a495
address nits and improve docs
2016-08-16 14:36:48 +02:00
Oliver Schneider
7ee4a9a659
lint modules that have the same name as their parent module
2016-08-16 14:29:21 +02:00
David Tolnay
95df2d1bf4
Update to rustc 1.12.0-nightly (1deb02ea6 2016-08-12)
2016-08-13 14:23:38 -07:00
scurest
b0a96def09
Add lint for reads and writes that depend on evaluation order
2016-08-11 06:01:40 -05:00
llogiq
ce3be22021
Merge pull request #1151 from oli-obk/clone_ref
...
add suggestions to clone_on_copy
2016-08-09 06:30:25 +02:00
llogiq
8ac99162ea
Merge pull request #1152 from oli-obk/wrong_self_conv_fn_level
...
enable changing wrong_self_convention's lint level at the function level
2016-08-08 21:13:16 +02:00
Oliver Schneider
331afc3246
extern fns often need to adhere to a specific api -> don't suggest api-changes
2016-08-08 17:21:47 +02:00
Oliver Schneider
49f276ec6f
enable changing wrong_self_convention's lint level at the function level
2016-08-08 17:09:36 +02:00
Oliver Schneider
7e67f447ce
add suggestions to clone_on_copy
...
also:
* don't report clone_on_copy when reporting clone_on_double_ref
* don't suggest `((x))`
2016-08-08 16:43:45 +02:00
Georg Brandl
d1403d2d7c
Remove "known problem" that only occurs without MIR.
...
Since clippy needs nightly, and nightly is MIR-by-default, we can
get rid of the warning.
2016-08-08 13:37:39 +02:00
Georg Brandl
c4dad550f7
Close code block in docstring
2016-08-08 13:34:21 +02:00
Georg Brandl
b91c1a509e
Make lint descriptions short and to the point; always fitting the column "triggers on".
2016-08-07 08:09:26 +02:00
Georg Brandl
3b5ff0f813
Make the lint docstrings more consistent.
2016-08-07 08:06:19 +02:00
Georg Brandl
bc2ecc9623
INDEXING_SLICING should probably be a restriction lint.
2016-08-07 08:05:37 +02:00
Manish Goregaokar
74c7880597
Merge pull request #1145 from birkenfeld/issue-703-2
...
Lint literal suffixes not separated by underscores (idea also from #703 )
2016-08-07 09:57:16 +05:30
Georg Brandl
fa0df69a97
Add a configurable threshold for enum variants before name lints trigger ( fixes #1138 )
2016-08-06 20:59:27 +02:00
Georg Brandl
2f8247ada5
Lint literal suffixes not separated by underscores (see #703 )
2016-08-05 18:50:23 +02:00
Georg Brandl
ab58331f22
Lint inconsistent casing in hex literals ( closes #703 )
2016-08-05 18:30:49 +02:00
Andre Bogus
75b85a55ec
added OAuth and TrueType to doc whitelist
2016-08-03 22:49:54 +02:00
Jakob Demler
d0fb8d765a
No warning when file is opened with read truncate and write
2016-08-02 22:57:32 +02:00
Oliver Schneider
81c5757f44
lint on by ref patterns for references
2016-08-01 16:59:14 +02:00
mcarton
30ec2c4d92
Rustup to rustc 1.12.0-nightly (1225e122f 2016-07-30)
2016-07-31 19:22:07 +02:00
mcarton
a01d7c93e7
Add IPv4
and IPv6
to the valid doc idents list
2016-07-31 01:07:28 +02:00
mcarton
81b9b2ca85
s/``/
``rust when relevant
...
It looks better on the wiki/the new documentation page.
2016-07-29 20:37:25 +02:00
Oliver Schneider
f7f9930b89
update lints
2016-07-20 17:34:58 +02:00
Oliver Schneider
100d381d2b
lint a += a + b
(possible mis-refactoring of a = a + b
)
2016-07-20 15:29:24 +02:00
Oliver Schneider
3ea9a249bc
get snippets inside the suggestions-closure
2016-07-20 13:29:01 +02:00
llogiq
a371558bdb
Merge pull request #1093 from oli-obk/serde_specific_lint
...
lint on implementing `visit_string` without also implementing `visit_str`
2016-07-18 11:53:28 +02:00
Oliver Schneider
b4ee9115d8
"fallout"
2016-07-18 11:19:45 +02:00
Oliver Schneider
02c46f057f
add an internal lint that catches misordered paths
2016-07-18 11:19:33 +02:00
mcarton
5eced5dc55
Dogfood
2016-07-17 13:33:51 +02:00
Manish Goregaokar
3e13e24ed5
redundant closures don't allocate
2016-07-16 18:25:00 +05:30
mcarton
caa76e119b
Improve docs
2016-07-16 00:26:54 +02:00
Oliver Schneider
fc54a91916
add the path to the util::path module
2016-07-15 18:10:28 +02:00
Manish Goregaokar
b8c5e5a89c
Fix position of mut in toplevel-ref-arg ( fixes #1100 , again)
2016-07-15 19:02:41 +05:30
Manish Goregaokar
60f354880f
Suggest mutability and fix type in toplevel-ref-arg
2016-07-15 17:52:34 +05:30
mcarton
557baf253a
Format code for methods lints
2016-07-14 22:56:20 +02:00
llogiq
b1becf41e4
Merge pull request #1099 from Manishearth/fix
...
Some small fixes
2016-07-14 21:32:45 +02:00
mcarton
ea665c38f1
Fix FP with USELESS_VEC
and non-copy types
2016-07-14 19:31:17 +02:00
mcarton
c1eb5828fa
Fix suggestion spans for NEEDLESS_RETURN
2016-07-14 18:32:48 +02:00
mcarton
3447bfccd9
Fix MANY_SINGLE_CHAR_NAMES
's docs
2016-07-14 17:42:57 +02:00
Taylor Cramer
61d1a9b030
Check for comparison of -0.0 and 0.0 in PartialOrd for Constant
2016-07-13 09:55:16 -07:00
Taylor Cramer
0dd13b0db2
Change floating point constant to mem::transmute u64 comparison
2016-07-13 00:59:35 -07:00
Taylor Cramer
8907cbc0b8
Added sign check on Constant f64 PartialEq implementation
2016-07-13 00:43:33 -07:00
Oliver Schneider
319c66a2a4
lint on implementing visit_string
without also implementing visit_str
2016-07-12 17:36:11 +02:00
Manish Goregaokar
e63b8342c3
Remove unnecessary feature
2016-07-12 20:21:45 +05:30
Manish Goregaokar
c1421c6e82
Don't warn when boxing large arrays
2016-07-12 18:49:34 +05:30
mcarton
3a201f43ec
Rustup to rustc 1.12.0-nightly (f93aaf84c 2016-07-09)
2016-07-10 15:42:02 +02:00
mcarton
efaed2ecfe
Link to known issues for MATCH_SAME_ARMS
2016-07-10 14:53:42 +02:00
mcarton
b8b6b7fee6
Try to explain MATCH_SAME_ARMS
better
2016-07-10 14:46:39 +02:00
mcarton
eb75d4ee62
Fix suggestions for NEW_WITHOUT_DEFAULT
2016-07-10 14:20:38 +02:00
mcarton
3a7402a6d2
Fix FP with for
loops and shadowed loop variable
2016-07-10 14:05:57 +02:00
llogiq
ad1cd99054
Merge pull request #1060 from Manishearth/sugg
...
Improve suggestions
2016-07-10 00:06:30 +02:00
Martin Pool
585a3b2565
Fix Markdown syntax in description of collapsible_if
2016-07-09 12:20:54 -07:00
mcarton
56d3bc7008
Handle /**
and ~~~
in DOC_MARKDOWN
2016-07-08 18:24:47 +02:00
David Tolnay
33c767c510
Add "JavaScript" to doc-valid-idents
2016-07-06 21:27:29 -07:00
mcarton
bf513229b1
Address PR's comments
2016-07-06 15:49:49 +02:00
mcarton
02547b9392
Merge remote-tracking branch 'origin/master' into sugg
2016-07-06 14:54:10 +02:00
mcarton
3bd0acaa5c
Remove useless feature attribute
...
`iter_arith` has been stabilized in rustc 1.11.0.
2016-07-06 14:51:20 +02:00
mcarton
8aaaf198e3
Use utils::sugg
in methods lints
2016-07-05 23:26:47 +02:00
mcarton
c5e91e70d0
Use sugg::Sugg
in transmute links
2016-07-04 02:22:57 +02:00
mcarton
9b79b1022c
Fix suggestions for needless_bool
2016-07-04 01:43:47 +02:00
mcarton
7778f314f2
Merge branch 'master' into sugg
2016-07-04 00:51:19 +02:00
mcarton
2f259b8cd3
Use span_suggestion
in entry lints
2016-07-03 23:27:44 +02:00
mcarton
ffa840d4f2
Use utils::sugg
in match
related lints
...
Also don't build suggestion when unnecessary.
2016-07-03 23:27:37 +02:00
James Lucas
10b545e30b
Check for constant expression in useless_vec lint
2016-07-03 12:12:43 -07:00
Manish Goregaokar
31948c4815
Make #991 work with current rust
2016-07-03 13:55:23 +05:30
mcarton
0e3dcd1376
Improve NOT_UNSAFE_PTR_ARG_DEREF
with functions
2016-07-03 13:29:04 +05:30
mcarton
7781f1d7c5
Add a new not_unsafe_ptr_arg_deref
lint
2016-07-03 13:28:34 +05:30
mcarton
cc18556ae5
Use utils::sugg
in swap lints
2016-07-02 17:31:22 +02:00
Martin Carton
d243d686fd
Merge pull request #1054 from Manishearth/rustup
...
Rustup to ea0dc9297283daff6486807f43e190b4eb561412
2016-07-02 16:15:57 +02:00
Ben Boeckel
d35b94349c
typo: use commas around "e.g."
2016-07-02 07:59:20 -04:00
mcarton
139b977d9d
Cleanup
2016-07-01 21:01:56 +02:00
mcarton
2a45a2ab6b
Use utils::sugg
in FOR_KV_MAP
2016-07-01 20:55:45 +02:00
mcarton
f6c9490e65
Fix wrong suggestion with ...
and for loops
2016-07-01 19:31:14 +02:00
mcarton
dbf6dc66d8
Add more sugggestion-building functions
2016-07-01 19:30:38 +02:00
mcarton
9bd7fa05e0
Improve NEEDLESS_RANGE_LOOP
error reporting
2016-07-01 18:53:04 +02:00
mcarton
e613c8b492
Introduce multispan_sugg
2016-07-01 18:43:42 +02:00
mcarton
97f65b0296
Rustup to ea0dc9297283daff6486807f43e190b4eb561412 III
2016-07-01 17:49:18 +02:00
mcarton
d6182b365c
Merge remote-tracking branch 'origin/rustup' into sugg
2016-07-01 17:48:57 +02:00
mcarton
55b78ae478
Rustup to ea0dc9297283daff6486807f43e190b4eb561412 II
2016-07-01 17:44:17 +02:00
mcarton
3c4af49662
Rustup to ea0dc9297283daff6486807f43e190b4eb561412
2016-07-01 17:44:17 +02:00
mcarton
28bd591f05
Only build suggestion if necessary in USELESS_VEC
2016-07-01 17:12:49 +02:00
mcarton
98f18f0474
Move vec!
unexpanding function to utils::higher
2016-07-01 17:12:49 +02:00
mcarton
4dff4df577
Move more functions to utils::higher
2016-07-01 17:12:49 +02:00
mcarton
92b04129fe
Move unsugar_range
to utils::higher
2016-07-01 17:12:49 +02:00
mcarton
ebf72cb67f
Use util::sugg
in TRANSMUTE_PTR_TO_REF
2016-07-01 17:12:48 +02:00
mcarton
169b63a84a
Improve TOPLEVEL_REF_ARG
message
2016-07-01 17:12:48 +02:00
mcarton
7023988020
Use utils::sugg
in TOPLEVEL_REF_ARG
2016-07-01 17:12:48 +02:00
mcarton
a3c505551f
Cleanup
2016-07-01 17:12:48 +02:00
mcarton
7a1fc9fce5
Use utils::sugg
in MATCH_BOOL
2016-07-01 17:12:48 +02:00
mcarton
66808c1e77
Use utils::sugg
in COLLAPSIBLE_IF
2016-07-01 17:12:48 +02:00
mcarton
2e8edde6e9
Use utils::sugg
in FLOAT_CMP
2016-07-01 17:12:48 +02:00
mcarton
8d58a928e5
Use utils::sugg
in ASSIGN_OPS
2016-07-01 17:12:48 +02:00
mcarton
9811dea237
Add a module to pretty-print suggestions
2016-07-01 17:12:48 +02:00
mcarton
580ae5a879
Use span_suggestion
in FLOAT_CMP
2016-07-01 17:12:48 +02:00
Andre Bogus
b73180231a
fixed doc nit
2016-06-30 06:33:21 +02:00
Andre Bogus
a12e8394d7
new lint: double_neg
2016-06-30 01:00:25 +02:00
mcarton
ea76ac5562
Make COLLAPSIBLE_IF
consider if let
2016-06-29 17:09:39 +02:00
mcarton
f6ba217c1c
Small cleanup
2016-06-29 17:09:39 +02:00
mcarton
f37c9adbd9
Make CollapsibleIf
an EarlyLintPass
...
It doesn't need any `hir` feature and `ast` is much more stable.
2016-06-29 17:09:39 +02:00
mcarton
7fa38f6787
Fix FP with mut_mut
and for
loops
2016-06-29 17:09:39 +02:00
Oliver Schneider
9ceb708727
Merge pull request #1053 from oli-obk/char_float_transmute
...
lint on unnecessary and plain wrong transmutes
2016-06-28 14:50:39 +02:00
Oliver Schneider
e06bc37477
lint on unnecessary and plain wrong transmutes
2016-06-28 14:08:08 +02:00
Manish Goregaokar
cdce78a4be
Add parentheses when necessary in transmute suggestion ( fixes #1049 )
2016-06-28 14:03:46 +05:30
llogiq
5aea20da7f
Merge pull request #1046 from oli-obk/unify_span_lint_usage
...
use span_lint_and_then instead of adding to the `DiagnosticWrapper`
2016-06-27 17:20:03 +02:00
Oliver Schneider
799861d7e0
use span_lint_and_then instead of adding to the DiagnosticWrapper
2016-06-27 17:14:04 +02:00
Oliver Schneider
a469ee1061
lint transmuting references to pointers
2016-06-27 16:12:48 +02:00
Oliver Schneider
083c57867a
refactor transmute lints into a single match
2016-06-27 13:46:21 +02:00
Oliver 'ker' Schneider
8c5e617c9a
don't lint on comparing *const f32
s
2016-06-25 18:59:37 +02:00
llogiq
f81d253c07
Merge pull request #995 from oli-obk/oh_the_horror
...
lint on `filter(x).map(y)`, `filter(x).flat_map(y)`, `filter_map(x).flat_map(y)`
2016-06-22 13:06:12 +02:00
Oliver Schneider
262148c946
update lint doc text
2016-06-22 13:03:59 +02:00
Oliver Schneider
5ccbf3d437
unify the lints
2016-06-22 10:44:46 +02:00
Martin Carton
294aeaf4b3
Merge pull request #1012 from Manishearth/nohyg
...
Don't use identifier hygiene in HIR
2016-06-21 21:23:39 +02:00
Oliver Schneider
415ddfb630
lint message nits
2016-06-21 14:41:16 +02:00
Oliver Schneider
8bfb31ee97
doc nits
2016-06-21 14:39:56 +02:00
Oliver Schneider
f5dfcd694b
fallout2
2016-06-21 13:51:44 +02:00
Oliver Schneider
48a5f8446d
fallout
2016-06-21 13:49:08 +02:00
Oliver Schneider
77e2155778
update lints
2016-06-21 13:32:34 +02:00
Oliver Schneider
4e52852146
create a lint for each of the messages
2016-06-21 13:04:50 +02:00
Oliver Schneider
36c5026c48
fix cargo clippy when using with --manifest-path
2016-06-21 12:31:30 +02:00
Oliver Schneider
69c796e118
lint on filter(x).map(y)
, filter(x).flat_map(y)
, filter_map(x).flat_map(y)
2016-06-21 12:29:44 +02:00
Manish Goregaokar
5b1d849c7e
Revert "fix cargo clippy when using with --manifest-path
"
...
This reverts commit b31bebeea4
.
2016-06-21 15:24:04 +05:30
Oliver Schneider
b31bebeea4
fix cargo clippy when using with --manifest-path
2016-06-21 11:35:34 +02:00
Devon Hollowood
0e04153a70
Remove uneccessary, leftover comments in lint_iter_mut()
2016-06-16 14:51:16 -07:00
Devon Hollowood
cfa0c5782e
Extend iter_nth lint to work with iter_mut() and VecDeque
2016-06-16 14:46:29 -07:00
llogiq
f3397afacb
Merge pull request #994 from oli-obk/stuttter
...
Stuttter lint
2016-06-16 19:00:43 +02:00
Oliver 'ker' Schneider
e628e4d513
allow by default
2016-06-16 18:37:56 +02:00
Martin Carton
4e8c87ad08
Merge pull request #1021 from Manishearth/issue1017
...
Fix FP with `WHILE_LET_LOOP` and break expressions
2016-06-16 16:30:44 +02:00
mcarton
836554387a
Fix FP with WHILE_LET_LOOP
and break expressions
2016-06-16 16:21:11 +02:00
Oliver Schneider
af98a7ce52
round 3
2016-06-16 12:20:05 +02:00
Oliver Schneider
a976401171
round 2
2016-06-16 12:20:05 +02:00
Oliver Schneider
4701f13551
round 1
2016-06-16 12:20:05 +02:00
Oliver Schneider
7253ce73bb
only lint public stutter namings
2016-06-16 12:17:15 +02:00
Oliver Schneider
8356d2fb21
lint items whose name starts/ends with their enclosing module's name
2016-06-16 12:17:15 +02:00
Oliver Schneider
32894d503e
lint enum variants names that start or end with their enum's name
2016-06-16 12:17:15 +02:00