Commit Graph

6409 Commits

Author SHA1 Message Date
uHOOCCOOHu
e6bbed909e
Add test 2019-07-19 02:43:10 +08:00
bors
d509b5afef Auto merge of #4274 - daxpedda:implicit_return_fixes, r=flip1995
false positives fixes of `implicit_return`

-  Handle returning macro statements properly (remove "this error originates in a macro outside of the current crate")
-  Handle functions that return never type
-  Handle functions that panic but do not return never type

changelog: Fix false positives in `implicit_return` lint pertaining to macros and panics
2019-07-18 18:20:40 +00:00
bors
e9ff319f3e Auto merge of #4284 - flip1995:rustfmt, r=phansch
Format code

changelog: none
2019-07-18 17:16:28 +00:00
flip1995
fc57b43f79
Format code 2019-07-18 17:23:22 +02:00
Philipp Hansch
35b7a98f4f
Decrease maximum length for stderr files
Now at 275.
2019-07-17 21:13:33 +02:00
daxpedda
9e5e0f8f84
Improved imports 2019-07-17 20:44:09 +02:00
bors
0626674d3c Auto merge of #4280 - phansch:uitests_matches, r=flip1995
UI Test Cleanup: Extract match_ref_pats tests

changelog: none

cc #2038
2019-07-17 08:08:18 +00:00
bors
5dfb5adbac Auto merge of #4259 - Darth-Revan:origin/inherent_to_string, r=flip1995
Implement lint for inherent to_string() method.

Fixes #4247

changelog: Implement two new lints: `inherent_to_string` and `inherent_to_string_shadow_display`

1) Emits a warning if a type implements an inherent method `to_string(&self) -> String`
2) Emits an error if a type implements an inherent method `to_string(&self) -> String` and also implements the `Display` trait
2019-07-17 07:23:25 +00:00
Darth-Revan
b7145fbb66
Fix "unkown clippy lint" error in UI test. 2019-07-17 08:58:36 +02:00
Darth-Revan
f0dc97965a
Corrections for PR review. 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
fb35311e9a Auto merge of #4278 - phansch:uitestcleanup_indexing, r=flip1995
UI Test Cleanup: Split out out_of_bounds_indexing

This moves the `out_of_bounds_indexing` lint tests to their own
directory.

changelog: none

cc #2038
2019-07-17 06:48:53 +00:00
Philipp Hansch
022b9876c2
UI Test Cleanup: Extract match_ref_pats tests 2019-07-17 08:08:26 +02:00
Philipp Hansch
38b6156a51
Update UI tests 2019-07-16 22:26:47 +02:00
bors
7498a5f13c Auto merge of #4276 - phansch:uitestcleanup, r=flip1995
UI Test Cleanup: Split up checked_unwrap tests

Let's slowly bring that ticket closer to the finish line 🐌 🏁

This splits up `tests/ui/checked_unwrap.rs` into:

 * `tests/ui/checked_unwrap/complex.rs`
 * `tests/ui/checked_unwrap/simple.rs`

Based on the naming of the methods in the tests.

changelog: none

cc #2038
2019-07-16 20:24:03 +00:00
Philipp Hansch
7a888968f9
Allow no_effect lint
for cleaner stderr file

Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-07-16 21:29:03 +02:00
Philipp Hansch
65e9477b84
Remove comment
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-07-16 21:28:37 +02:00
Philipp Hansch
633934da18
cargo fmt 2019-07-16 21:28:03 +02:00
Philipp Hansch
48bff49484
UI Test Cleanup: Split up checked_unwrap tests
This splits up `tests/ui/checked_unwrap.rs` into:

 * `tests/ui/checked_unwrap/complex.rs`
 * `tests/ui/checked_unwrap/simple.rs`

Based on the naming of the methods in the tests.

cc #2038
2019-07-16 21:23:43 +02:00
daxpedda
a2b63af746
Removed lintining on never type.
Abstracted repeating strings into statics.
2019-07-16 14:46:33 +02:00
bors
164310dd8d Auto merge of #4275 - jayhardee9:fix/cmp-signum, r=flip1995
Fix float_cmp false positive when comparing signum

fixes #4248

changelog: Fix float_cmp false positive when comparing signum
2019-07-16 07:33:46 +00:00
Philipp Hansch
33010ae7e6
UI Test Cleanup: Split out out_of_bounds_indexing
This moves the `out_of_bounds_indexing` lint tests to their own
directory.
2019-07-16 07:30:23 +02:00
bors
e2948153d0 Auto merge of #4211 - flip1995:check_changelog, r=matthiaskrgr
Check for changelog entry in PR bodies

cc #4031 but now on the auto and try branches. (https://github.com/rust-lang/rust-clippy/issues/3955#issuecomment-502230021)

changelog: none
2019-07-15 23:18:42 +00:00
Jerry Hardee
8a8eedf388 Lint 2019-07-15 14:00:07 -05:00
Jerry Hardee
8adbf7f2c1 Fix float_cmp false positive when comparing signum
f1.signum() == f2.signum()
f1.signum() != f2.signum()
should not trigger a warning.
2019-07-15 12:46:58 -05:00
flip1995
1c87df486e
grep only lines, that start with 'changelog: ' 2019-07-15 19:39:59 +02:00
flip1995
61ca901e51
Get PR number from bors commit message 2019-07-15 19:39:59 +02:00
flip1995
cb6cec5695
Authenticate with github_api_token 2019-07-15 19:39:59 +02:00
flip1995
a0f6c9361b
Check PRs for changelog entry in the body 2019-07-15 19:39:58 +02:00
daxpedda
6c067bf50e
false positives fixes of implicit_return
-  Handle returning macro statements properly
-  Handle functions that return never type
-  Handle functions that panic but do not return never type
2019-07-15 16:02:50 +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
bors
48b50e80b1 Auto merge of #3418 - phansch:add_travis_windows_build, r=me,flip1995
Fix Travis Windows build

Closes #3306
2019-07-15 05:20:34 +00:00
flip1995
ce2a7b0160
Disable dogfood on windows for faster build time on travis 2019-07-14 15:21:50 +02:00
flip1995
625051d3e7
Revert "Remove CARGO_INCREMENTAL=0 from windows build"
This reverts commit 876a7e1f01.

Using incremental build on windows increases the build time on travis by
about 8 minutes.
2019-07-14 15:13:47 +02:00
flip1995
876a7e1f01
Remove CARGO_INCREMENTAL=0 from windows build 2019-07-13 13:26:26 +02:00
flip1995
4817c2c381
Test with different sysroots dependent on the OS 2019-07-13 12:48:43 +02:00
flip1995
c100c70822
Build sys_root in driver with PathBuf instead of String 2019-07-13 12:48:42 +02:00
flip1995
6b8ebcc0c8
Don't re-set the LD_LIBRARY_PATH in base_tests.sh 2019-07-13 12:48:42 +02:00
flip1995
2991f31c17
Add master toolchain binaries to the PATH 2019-07-13 12:48:42 +02:00
Philipp Hansch
ac6e52a91c
Change conditional
Maybe uname == Linux was true on the windows VM?
This could be a way to avoid the secret environment variable issue with
Travis CI.
2019-07-13 12:48:42 +02:00
Philipp Hansch
bd2c76824d
Stop allowing failures in Travis windows build 2019-07-13 12:48:42 +02:00
bors
36fb646394 Auto merge of #4229 - euclio:lint-doc-generation-fix, r=flip1995
don't strip blank lines in lint documentation

changelog: don't strip blank lines in lint documentation

Fixes #4116.

This PR also switches the docs headings to deterministically display in the order that they are declared in the source, with "Configuration" always appearing last. It doesn't seem like there was a defined order before.
2019-07-13 10:05:15 +00:00
bors
3267e054da Auto merge of #4232 - mikerite:dev-fmt-4, r=flip1995
Add dev fmt subcommand

changelog: none
2019-07-13 09:26:16 +00:00
bors
10b915fa7e Auto merge of #4268 - mikerite:fix-4260, r=flip1995
Fix bug in `implicit_hasher` causing crashes

Skip linting if the type is from an external macro. Closes #4260.

changelog: Fix bug in `implicit_hasher` causing crashes
2019-07-13 08:59:12 +00:00
Michael Wright
76d66e6413 Merge branch 'master' into dev-fmt-4 2019-07-13 09:20:54 +02:00
bors
b0290424bb Auto merge of #4269 - lzutao:rustup, r=flip1995
Rustup `macro expansion and resolution`

Rustup https://github.com/rust-lang/rust/pull/62476

changelog: none
2019-07-12 07:26:03 +00:00
Lzu Tao
27c5348793 Rustup macro expansion and resolution 2019-07-12 00:26:36 +07:00
Michael Wright
de7749832c Fix bug in implicit_hasher causing crashes
Skip linting if the type is from an external macro. Closes #4260.
2019-07-11 08:47:05 +02:00
Michael Wright
2c90083f62 Avoid rustfmt bug on Windows 2019-07-11 05:21:44 +00:00