Skip to content

Issue4983 bool equal not bool #5144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 351 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
351 commits
Select commit Hold shift + click to select a range
3da2c91
Save Lint::module as full path of module
flip1995 Feb 11, 2020
4a9bfe4
Let update_lints also generate the internal lints
flip1995 Feb 11, 2020
2635a60
Update some documentation
flip1995 Feb 11, 2020
0702698
Rename lint_count -> usable_lint_count
flip1995 Feb 12, 2020
50a2f97
Adapt gen_lint_group_list test to also generate internal lints
flip1995 Feb 14, 2020
933a0a9
Auto merge of #5156 - flip1995:dev_add_internal, r=phansch
bors Feb 15, 2020
779b6ae
Auto merge of #4809 - iankronquist:patch-1, r=flip1995
bors Feb 15, 2020
787398a
Avoid using regions from `TypeckTables`
matthewjasper Feb 15, 2020
578960d
Auto merge of #5177 - matthewjasper:own-infer, r=flip1995
bors Feb 15, 2020
4480ec5
Rustup to rust-lang/rust#67953
JohnTitor Feb 17, 2020
09165ff
Don't lint `single_component_path_imports` in macros
JohnTitor Feb 16, 2020
da78c31
Auto merge of #5182 - JohnTitor:infer, r=matthiaskrgr
bors Feb 17, 2020
ba246c8
Auto merge of #5183 - JohnTitor:fix-fp-import, r=matthiaskrgr
bors Feb 17, 2020
d488218
Reduce pulldown-cmark size
JohnTitor Feb 17, 2020
b54be5f
Auto merge of #5184 - JohnTitor:reduce-dep-size, r=phansch
bors Feb 17, 2020
0532f3e
Add lint to detect lossy float literals
krishna-veerareddy Feb 17, 2020
5524528
Add tests for lossy whole number float literals
krishna-veerareddy Feb 17, 2020
45936a6
Uplift `excessive_precision` to the correctness category
krishna-veerareddy Feb 17, 2020
74f5e34
Auto merge of #5185 - krishna-veerareddy:issue-5160-lossy-float-liter…
bors Feb 17, 2020
f56e8b7
Rename `FunctionRetTy` to `FnRetTy`
JohnTitor Feb 17, 2020
b91ae16
Auto merge of #5186 - JohnTitor:rename-fnretty, r=flip1995
bors Feb 17, 2020
0b168c6
Add `Future` detection for `missing_errors_doc`.
daxpedda Feb 16, 2020
0ee393c
Add tests and improve checks.
daxpedda Feb 17, 2020
d8716f5
Fix ICE.
daxpedda Feb 17, 2020
8e2dab3
Use `if_chain`.
daxpedda Feb 17, 2020
ea5ac40
Remove use of `TyKind`.
daxpedda Feb 17, 2020
db2fbb1
Auto merge of #5181 - daxpedda:future-missing-errors-doc, r=flip1995
bors Feb 17, 2020
e2fc801
needless_doctest_main: False positive for async fn
jonhoo Feb 17, 2020
0da4dd0
Auto merge of #5189 - jonhoo:async-fn-main-not-needless, r=llogiq
bors Feb 17, 2020
6835e2d
Nuke Travis+AppVeyor CI
flip1995 Feb 12, 2020
f4b8039
Use `Vec::with_capacity()` as possible
JohnTitor Feb 18, 2020
06cb96e
Clean up imports
JohnTitor Feb 18, 2020
bfa3343
Auto merge of #5191 - JohnTitor:clean-up, r=flip1995
bors Feb 18, 2020
533422f
Add `LOG2_10` and `LOG10_2` to `approx_const` lint
krishna-veerareddy Feb 18, 2020
27acea0
Auto merge of #5193 - krishna-veerareddy:add-more-log-consts, r=flip1995
bors Feb 18, 2020
aa4cf72
Rustup to rust-lang/rust#69181
JohnTitor Feb 18, 2020
fe0f6c6
Auto merge of #5194 - JohnTitor:rustup-0219, r=matthiaskrgr
bors Feb 18, 2020
79c0cf0
Rustup to rust-lang/rust#69194
JohnTitor Feb 19, 2020
2855b21
Auto merge of #5195 - JohnTitor:rustup-take2, r=matthiaskrgr
bors Feb 19, 2020
06f0ab0
Auto merge of #5190 - flip1995:nuke_traveyor, r=phansch,Manishearth,l…
bors Feb 19, 2020
1c5c054
Rename for clarity
sinkuu Feb 14, 2020
9d25454
Migrate to generic dataflow
sinkuu Feb 14, 2020
2323343
Add Copyright claim, where missing
flip1995 Feb 20, 2020
7a85b77
Update Copyright year
flip1995 Feb 20, 2020
fb989d3
Remove remaining license header in test file
flip1995 Feb 20, 2020
5fbec44
Auto merge of #5198 - sinkuu:redundant_clone_df, r=flip1995
bors Feb 20, 2020
8daeee5
Auto merge of #5204 - flip1995:license, r=Manishearth
bors Feb 20, 2020
78a2507
Move unneeded_field_pattern to restriction group
nipunn1313 Feb 19, 2020
4f85bc2
rustup https://github.com/rust-lang/rust/pull/69325, update test stderr
matthiaskrgr Feb 20, 2020
f5b4acc
Auto merge of #5208 - matthiaskrgr:stderr, r=flip1995
bors Feb 20, 2020
ce896ae
Rustup to rust-lang/rust#69072
krishna-veerareddy Feb 21, 2020
0d7ae7b
Auto merge of #5211 - krishna-veerareddy:rustup-69072, r=flip1995
bors Feb 21, 2020
219c94d
Separate out lint to check lossy whole number float literals
krishna-veerareddy Feb 21, 2020
8abe436
Use generator own DefId
JohnTitor Feb 21, 2020
3fc2419
Auto merge of #5200 - nipunn1313:unneeded_field_pattern, r=flip1995
bors Feb 21, 2020
8fbb23f
Auto merge of #5213 - JohnTitor:warm-return-ty, r=flip1995
bors Feb 21, 2020
acfcbee
Auto merge of #5202 - krishna-veerareddy:issue-5201-move-lossy-float-…
bors Feb 21, 2020
8a572a5
Add tests for wildcard_imports lint
flip1995 Jan 7, 2020
ba1d50c
Implement wildcard_imports lint
flip1995 Jan 7, 2020
4229dbc
Run update_lints
flip1995 Jan 7, 2020
3f5ed28
Let's do it the easy way
flip1995 Jan 9, 2020
06a6189
Move enum_glob_use lint into wildcard_imports pass
flip1995 Jan 14, 2020
f4f781d
Filter prelude glob imports
flip1995 Feb 9, 2020
b67764d
Add test for prelude import
flip1995 Feb 9, 2020
8472ecd
Fix fallout
flip1995 Feb 21, 2020
b562a51
Don't use use ty::TyKind::*
flip1995 Feb 21, 2020
4dd2252
Fix suggestion for weird formattings
flip1995 Feb 21, 2020
e342047
Auto merge of #5029 - flip1995:wildcard_imports, r=phansch
bors Feb 21, 2020
0490798
Prevent `missing_const_for_fn` on functions with const generic params
krishna-veerareddy Feb 22, 2020
7e49122
Auto merge of #5216 - krishna-veerareddy:issue-5192-fp-const-fn, r=fl…
bors Feb 22, 2020
036ec5b
Rustup to rust-lang/rust#69366
JohnTitor Feb 24, 2020
fc5d0cc
Auto merge of #5221 - JohnTitor:rustup, r=phansch
bors Feb 24, 2020
ee91b5b
Do not run deploy action on other repos
JohnTitor Feb 24, 2020
c636c6a
Add lints to detect inaccurate and inefficient FP operations
krishna-veerareddy Dec 14, 2019
1f4f357
Consolidate the accuracy and efficiency lints
krishna-veerareddy Dec 15, 2019
9520d3d
Suggest usage of `powi` method when applicable
krishna-veerareddy Dec 16, 2019
de79733
Lint expressions of the form `x.log(b) / y.log(b)`
krishna-veerareddy Dec 17, 2019
a60ae5d
Split test cases into separate files
krishna-veerareddy Dec 21, 2019
de07c84
Detect usage of `(x + 1).ln()` and suggest `x.ln_1p()` instead
krishna-veerareddy Dec 21, 2019
fd2506b
Add type suffixes to unsuffixed method receiver suggestions
krishna-veerareddy Jan 4, 2020
bc03f46
Remove lint for logarithm division identity
krishna-veerareddy Feb 17, 2020
6dacb1a
Change lint name to `suboptimal_flops`
krishna-veerareddy Feb 17, 2020
bc706e3
Fix `powi` suggestion and add general improvements
krishna-veerareddy Feb 23, 2020
454e505
Run rust-fix on tests
krishna-veerareddy Feb 23, 2020
4065ca9
Move `manual_mul_add` into `suboptimal_flops` lint
krishna-veerareddy Feb 23, 2020
e94a167
Rename `mul_add` test file and add general improvements
krishna-veerareddy Feb 24, 2020
ff0d44e
Add `imprecise_flops` lint
krishna-veerareddy Feb 24, 2020
c6ad3db
Auto merge of #5222 - JohnTitor:dont-deploy, r=flip1995
bors Feb 24, 2020
2734e4e
Auto merge of #4897 - krishna-veerareddy:issue-2040-accurate-float-fu…
bors Feb 24, 2020
7c760e5
Rustup to rust-lang/rust#61812
JohnTitor Feb 27, 2020
384593c
Auto merge of #5231 - JohnTitor:associated-type-defaults, r=phansch
bors Feb 27, 2020
43e760c
Update git2 to 0.12
JohnTitor Feb 27, 2020
610bcea
Auto merge of #5232 - JohnTitor:git2-0.12, r=phansch
bors Feb 27, 2020
f822497
Fix deploy script for tag deploys
flip1995 Feb 27, 2020
ce0dc9b
Created floating point abs lint and test, but not yet run
JarredAllen Feb 28, 2020
5a21661
Some bugfixing
JarredAllen Feb 28, 2020
1e29b36
add test for #5238
matthiaskrgr Feb 28, 2020
028cddb
Finished checking for cases of absolute values
JarredAllen Feb 29, 2020
bfa2691
Run cargo dev fmt
JarredAllen Mar 1, 2020
ee73972
Changed test output to reflect cargo fmt
JarredAllen Mar 1, 2020
4253aa7
Rustup to rust-lang/rust#69592
JohnTitor Mar 1, 2020
78dc48e
Rustup to rust-lang/rust#69579
JohnTitor Mar 1, 2020
cda7881
Disable rls test for now
JohnTitor Mar 1, 2020
0f4a3fe
Auto merge of #5247 - JohnTitor:syntax, r=flip1995
bors Mar 1, 2020
91a1cd5
Merge branch 'master' of github.com:rust-lang/rust-clippy
JarredAllen Mar 1, 2020
0a6d299
Fixed compile error from merging
JarredAllen Mar 1, 2020
d887503
Refactor suggested by krishna-veerareddy
JarredAllen Mar 2, 2020
0d584f3
Fix one last test issue
JarredAllen Mar 2, 2020
8669be5
Whitelist unused attribute for use items.
mlegner Mar 2, 2020
f1d0791
Rustup to rust-lang/rust#69469
JohnTitor Mar 2, 2020
8b7f7e6
Auto merge of #5254 - JohnTitor:sugg, r=flip1995
bors Mar 2, 2020
a94b2c1
Auto merge of #5242 - matthiaskrgr:5238_test, r=flip1995
bors Mar 2, 2020
a628733
Don't lint debug formatting in debug impl
flip1995 Jan 14, 2020
a540b5c
Update stderr
flip1995 Jan 14, 2020
58cea33
Use lang items instead of get_trait_def_id where possible
flip1995 Mar 3, 2020
91042db
Add path for display trait
flip1995 Mar 3, 2020
5d3e3e1
Auto merge of #5250 - mlegner:unused_fp, r=flip1995
bors Mar 3, 2020
f44181e
Auto merge of #5047 - flip1995:use_debug, r=phansch
bors Mar 3, 2020
b96c3ca
Auto merge of #5259 - flip1995:lang_items, r=phansch
bors Mar 3, 2020
3d44ad2
Use `try_eval_usize` over `eval_usize`
JohnTitor Mar 2, 2020
46ee6b1
Add regression test
JohnTitor Mar 3, 2020
d74229b
Auto merge of #5256 - JohnTitor:try-eval-usize, r=phansch
bors Mar 3, 2020
94867fb
use question mark operator
matthiaskrgr Mar 3, 2020
e4d688c
Auto merge of #5261 - matthiaskrgr:qmark, r=flip1995
bors Mar 3, 2020
e633ea8
Revive rls integration test
JohnTitor Mar 3, 2020
9c93f04
Auto merge of #5262 - JohnTitor:rls, r=flip1995
bors Mar 3, 2020
f8e949f
Recommended changes from flip1995
JarredAllen Mar 3, 2020
a640696
Rustup to rust-lang/rust#69506
flip1995 Mar 3, 2020
74eae9d
Auto merge of #5264 - flip1995:rustup, r=flip1995
bors Mar 4, 2020
fe342f3
Ran cargo dev fmt
JarredAllen Mar 4, 2020
c3e96d1
Update test case answers to match cargo dev fmt
JarredAllen Mar 4, 2020
2aa14c9
Add restrictive pat use in full binded struct
ThibsG Mar 1, 2020
45f61ea
Lint `if let Some` in question_mark lint
sinkuu Mar 4, 2020
246709f
run-rustfix
sinkuu Mar 4, 2020
8dc3fde
Auto merge of #5246 - JarredAllen:master, r=flip1995
bors Mar 4, 2020
36b6598
Auto merge of #5258 - ThibsG:UselessBindingInStruct638, r=flip1995
bors Mar 4, 2020
9ff4581
Test for unnecessary_cast of hex int literal.
mlegner Mar 2, 2020
6673cc8
Resolve false positives for hex int cast.
mlegner Mar 2, 2020
73deb72
Included binary and octal cases.
mlegner Mar 3, 2020
d14fdc0
Move NumericLiteral to its own module.
mlegner Mar 3, 2020
185fa0d
Simplify if_chain.
mlegner Mar 4, 2020
a78a1fc
Apply suggestions from code review
sinkuu Mar 4, 2020
8c7b3ad
Auto merge of #5266 - sinkuu:questionmark, r=flip1995
bors Mar 4, 2020
597e02d
warn on macro_use attr
DevinR528 Feb 26, 2020
329923e
Auto merge of #5257 - mlegner:cast_hex_fp, r=flip1995
bors Mar 4, 2020
ac2e10a
Auto merge of #5235 - flip1995:tag_deploy_fix, r=phansch
bors Mar 5, 2020
23d2b21
Auto merge of #5230 - DevinR528:macro-use, r=flip1995
bors Mar 5, 2020
57393b5
Rename macro_use_import -> macro_use_imports
flip1995 Mar 5, 2020
3d0f0e3
Auto merge of #5276 - flip1995:macro_use, r=flip1995
bors Mar 5, 2020
d816712
transition rustc-guide to rustc-dev-guide
chrissimpkins Mar 6, 2020
0f7f307
add lint on File::read_to_string and File::read_to_end
jmeyers35 Mar 5, 2020
8066993
deps: bump itertools 0.8 -> 0.9
matthiaskrgr Mar 8, 2020
a412b34
check_pat: delay creation of the "normal" vec until we reach the bran…
matthiaskrgr Mar 8, 2020
75a2300
redundant_pattern: take binding (ref, ref mut) into account in sugges…
matthiaskrgr Mar 8, 2020
3b3e5ea
Mention the setup instructions in CONTRIBUTING
polybuildr Mar 8, 2020
ab6e709
Improve error messages for {option,result}_map_unit_fn
polybuildr Mar 8, 2020
bc51a1a
Auto merge of #5289 - polybuildr:setup, r=matthiaskrgr
bors Mar 8, 2020
c7b395f
Auto merge of #5290 - polybuildr:map-message, r=phansch
bors Mar 9, 2020
a5477c5
Auto merge of #5285 - matthiaskrgr:dep_it, r=flip1995
bors Mar 9, 2020
40a04f2
Fix match single binding when in a let stmt
ThibsG Mar 8, 2020
118594f
Auto merge of #5291 - ThibsG:FixSingleBinding, r=flip1995
bors Mar 9, 2020
92e25bb
Auto merge of #5286 - matthiaskrgr:delay_vec_creation, r=flip1995
bors Mar 9, 2020
d8f64b6
Auto merge of #5287 - matthiaskrgr:pat_isref, r=flip1995
bors Mar 9, 2020
697e3c8
Improve placeholder in map_unit_fn
jpospychala Mar 8, 2020
64b7624
Auto merge of #5292 - jpospychala:map-placeholder, r=flip1995
bors Mar 9, 2020
58dec1c
update rust-lang.github.io to rustc-dev-guide.rust-lang.org
chrissimpkins Mar 9, 2020
c3d3c50
Auto merge of #5277 - chrissimpkins:rustc-dev-guide-transition, r=fli…
bors Mar 9, 2020
5fd74a9
clippy_lints: readme: don't mention crates.io since it is no longer u…
matthiaskrgr Mar 10, 2020
187bbf0
Auto merge of #5295 - matthiaskrgr:lints_readme, r=flip1995
bors Mar 10, 2020
a3d9355
Fix ICE with trivial_bounds feature
sinkuu Mar 10, 2020
227ef60
Fix doc
sinkuu Mar 10, 2020
8d2a3e0
Use `node_type_opt` over `node_type`
JohnTitor Mar 10, 2020
3aa8da3
Auto merge of #5297 - JohnTitor:shadow, r=phansch
bors Mar 10, 2020
557f684
Auto merge of #5296 - sinkuu:fix_ice_trivial_bounds, r=flip1995
bors Mar 10, 2020
2fa3da4
needless_doc_main: only check rust code
Mar 10, 2020
8cdd75c
Clean-up CONTRIBUTING.md
JohnTitor Mar 10, 2020
459fb53
Clean-up adding_lints.md
JohnTitor Mar 10, 2020
19e72a2
Move links to the end of each chapter on CONTRIBUTING
JohnTitor Mar 10, 2020
0de71b0
Move links to the end of each chapter on adding_lints
JohnTitor Mar 10, 2020
16b925b
Auto merge of #5299 - JohnTitor:contrib, r=flip1995
bors Mar 10, 2020
d5c8b78
Update tests/ui/needless_doc_main.rs
Manishearth Mar 10, 2020
23bd427
Auto merge of #5298 - rust-lang:needless_doc_main_code, r=flip1995,Ma…
bors Mar 10, 2020
515847d
Use `edition:2018` flag more widely
JohnTitor Mar 10, 2020
d4eb496
Improve documentation
JohnTitor Mar 10, 2020
a4ba102
add CR feedback
jmeyers35 Mar 10, 2020
9d5ffe8
Auto merge of #5300 - JohnTitor:edition-flag, r=flip1995
bors Mar 10, 2020
fdce47b
Auto merge of #5272 - jmeyers35:file_read_lint, r=flip1995
bors Mar 10, 2020
9de6421
Extend `redundant_clone` to the case that cloned value is not consumed
sinkuu Mar 12, 2020
a377378
Only fires on temporaries
sinkuu Mar 12, 2020
aca64b8
Check for mutation
sinkuu Mar 12, 2020
d9ad338
Use visit_place
sinkuu Mar 12, 2020
3e37766
Rustup to rust-lang/rust#69674
JohnTitor Mar 12, 2020
da29402
Update CHANGELOG.md
flip1995 Mar 12, 2020
6525127
Update changelog_update doc to reflect the actual ordering of the cha…
flip1995 Mar 12, 2020
7b08c7a
Change changelog formatting
flip1995 Mar 12, 2020
b064ea8
Auto merge of #5307 - JohnTitor:rename-method, r=flip1995
bors Mar 12, 2020
8485d40
Auto merge of #5304 - sinkuu:redundant_clone_not_consumed, r=flip1995
bors Mar 12, 2020
2d8a362
Auto merge of #5308 - flip1995:changelog, r=Manishearth
bors Mar 13, 2020
f56b0a1
Document that wildcard_imports doesn't warn about `use ...::prelude::*;`
joshtriplett Mar 13, 2020
34a00fe
Remove git2 dependency.
ehuss Mar 14, 2020
626f2fe
Fix typo
flip1995 Mar 14, 2020
ceb9b7d
Auto merge of #5314 - ehuss:remove-git2, r=flip1995
bors Mar 14, 2020
df64ea6
Auto merge of #5312 - joshtriplett:wildcard-prelude-documentation, r=…
bors Mar 14, 2020
29df013
Use pattern matching instead of manually checking condition
tesuji Mar 14, 2020
6be0220
Use `into_path`
tesuji Mar 14, 2020
9febcf5
Don't convert Path to lossy str
tesuji Mar 14, 2020
00861d1
Rustup to rust-lang/rust#69076
JohnTitor Mar 14, 2020
8fd7e31
Auto merge of #5317 - JohnTitor:rustup, r=matthiaskrgr
bors Mar 14, 2020
c1a138c
Auto merge of #5316 - lzutao:osstr, r=phansch
bors Mar 15, 2020
4d8ed5a
rustup https://github.com/rust-lang/rust/pull/69589/
matthiaskrgr Mar 15, 2020
d8bcdac
Auto merge of #5318 - matthiaskrgr:rustup_30, r=flip1995
bors Mar 15, 2020
548c417
Make use of `or_patterns` feature
phansch Mar 16, 2020
ba0884b
rustup https://github.com/rust-lang/rust/pull/68944
matthiaskrgr Mar 15, 2020
d556bb7
Auto merge of #5321 - matthiaskrgr:rustup_31, r=phansch
bors Mar 16, 2020
24f6d64
Auto merge of #5322 - phansch:or_patterns, r=matthiaskrgr
bors Mar 16, 2020
a97f60b
rustup https://github.com/rust-lang/rust/pull/69738
matthiaskrgr Mar 16, 2020
23549a8
Auto merge of #5324 - matthiaskrgr:rustup_32, r=flip1995
bors Mar 16, 2020
b8effec
rustup https://github.com/rust-lang/rust/pull/69838
matthiaskrgr Mar 17, 2020
7545925
new_lint.rs: encourage authors to write more detailed code samples in…
matthiaskrgr Mar 18, 2020
2204bf2
clean up a few lint docs
matthiaskrgr Mar 18, 2020
b875c53
rustup https://github.com/rust-lang/rust/pull/69189
matthiaskrgr Mar 18, 2020
c7c7ab2
integer_arithmetic: detect integer arithmetic on references.
matthiaskrgr Mar 17, 2020
552768f
Update changelog to 1.43.0 beta
flip1995 Mar 18, 2020
89cffe1
Auto merge of #5330 - matthiaskrgr:newlint_expl, r=flip1995
bors Mar 18, 2020
a808779
Split up checked_unwrap test further
flip1995 Mar 18, 2020
f041dcd
Fix limit-stderr-files test
flip1995 Mar 18, 2020
08fc398
Auto merge of #5331 - matthiaskrgr:lint_docs1, r=flip1995
bors Mar 18, 2020
ec1dcde
tests: arithmetic: split into integer_arithmetic and float_arithmetic…
matthiaskrgr Mar 18, 2020
e004b94
Auto merge of #5329 - matthiaskrgr:int_arith_on_ref_5328, r=flip1995
bors Mar 18, 2020
c036c4f
Auto merge of #5335 - flip1995:changelog, r=Manishearth
bors Mar 18, 2020
0812a0a
Improvement: Don't show function body in needless_lifetimes
rabisg0 Mar 16, 2020
b9d6bf3
rustup https://github.com/rust-lang/rust/pull/69920/
matthiaskrgr Mar 18, 2020
21aeb21
Rustup to rust-lang/rust#66131
flip1995 Mar 19, 2020
0277066
Rollup merge of #5326 - matthiaskrgr:rustup_33, r=flip1995
flip1995 Mar 19, 2020
983d195
Rollup merge of #5333 - matthiaskrgr:rustup_34, r=flip1995
flip1995 Mar 19, 2020
a46675f
Rollup merge of #5336 - matthiaskrgr:rustup_35, r=flip1995
flip1995 Mar 19, 2020
606e328
Rollup merge of #5341 - flip1995:rustup, r=flip1995
flip1995 Mar 19, 2020
e4fc931
Get integration test binary from deps dir
flip1995 Mar 19, 2020
d8e6e4c
Auto merge of #5342 - flip1995:rollup-77s2pmt, r=flip1995
bors Mar 19, 2020
0e5e2c4
Auto merge of #5323 - rabisg0:fix/5284, r=flip1995
bors Mar 20, 2020
badfbbb
Fix single binding in closure
ThibsG Mar 21, 2020
a1dc609
Fix documentation generation for configurable lints
flip1995 Mar 22, 2020
89303da
Auto merge of #5353 - flip1995:conf_doc, r=Manishearth
bors Mar 22, 2020
0f31951
rustup https://github.com/rust-lang/rust/pull/69968/
matthiaskrgr Mar 23, 2020
43bdee0
Auto merge of #5361 - matthiaskrgr:rustup_37, r=flip1995
bors Mar 23, 2020
1ff81c1
Auto merge of #5350 - ThibsG:FixSingleBindingClosure, r=flip1995
bors Mar 23, 2020
e1fc649
Initial lint infrastructure
mgr-inz-rafal Feb 3, 2020
154b2d4
Detect offending comparison
mgr-inz-rafal Feb 4, 2020
6160e87
Add issue4983() to test
mgr-inz-rafal Feb 6, 2020
a0766b9
Merge branch 'issue4983_bool_equal_not_bool' of github.com:mgr-inz-ra…
mgr-inz-rafal Mar 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
82 changes: 25 additions & 57 deletions .github/deploy.sh
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,81 +1,49 @@
#!/bin/bash

# Automatically deploy on gh-pages

set -ex

SOURCE_BRANCH="master"
TARGET_BRANCH="gh-pages"

# Save some useful information
REPO=$(git config remote.origin.url)
SSH_REPO=${REPO/https:\/\/github.com\//[email protected]:}
SHA=$(git rev-parse --verify HEAD)

# Clone the existing gh-pages for this repo into out/
git clone --quiet --single-branch --branch "$TARGET_BRANCH" "$REPO" out

echo "Removing the current docs for master"
rm -rf out/master/ || exit 0

echo "Making the docs for master"
mkdir out/master/
cp util/gh-pages/index.html out/master
python ./util/export.py out/master/lints.json
python3 ./util/export.py out/master/lints.json

if [[ -n "$TRAVIS_TAG" ]]; then
echo "Save the doc for the current tag ($TRAVIS_TAG) and point current/ to it"
cp -r out/master "out/$TRAVIS_TAG"
rm -f out/current
ln -s "$TRAVIS_TAG" out/current
if [[ -n $TAG_NAME ]]; then
echo "Save the doc for the current tag ($TAG_NAME) and point stable/ to it"
cp -r out/master "out/$TAG_NAME"
rm -f out/stable
ln -s "$TAG_NAME" out/stable
fi

# Generate version index that is shown as root index page
cp util/gh-pages/versions.html out/index.html
pushd out

cat <<-EOF | python - > versions.json
import os, json
print json.dumps([
dir for dir in os.listdir(".") if not dir.startswith(".") and os.path.isdir(dir)
])
EOF
popd

# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]] || [[ "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]]; then
# Tags should deploy
if [[ -z "$TRAVIS_TAG" ]]; then
echo "Generated, won't push"
exit 0
fi
fi
echo "Making the versions.json file"
python3 ./util/versions.py out

# Now let's go have some fun with the cloned repo
cd out
git config user.name "Travis CI"
git config user.email "[email protected]"
# Now let's go have some fun with the cloned repo
git config user.name "GHA CI"
git config user.email "[email protected]"

if git diff --exit-code --quiet; then
echo "No changes to the output on this push; exiting."
exit 0
echo "No changes to the output on this push; exiting."
exit 0
fi
cd -

# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
ENCRYPTION_LABEL=e3a2d77100be
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
openssl aes-256-cbc -K "$ENCRYPTED_KEY" -iv "$ENCRYPTED_IV" -in .github/deploy_key.enc -out .github/deploy_key -d
chmod 600 .github/deploy_key
eval "$(ssh-agent -s)"
ssh-add .github/deploy_key

cd out
git add .
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
if [[ -n $TAG_NAME ]]; then
# Add the new dir
git add $TAG_NAME
# Update the symlink
git add stable
# Update versions file
git add versions.json
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
else
git add .
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
fi

# Now that we're all set up, we can push.
git push "$SSH_REPO" "$TARGET_BRANCH"
Binary file removed .github/deploy_key.enc
Binary file not shown.
29 changes: 29 additions & 0 deletions .github/driver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -ex

# Check sysroot handling
sysroot=$(./target/debug/clippy-driver --print sysroot)
test "$sysroot" = "$(rustc --print sysroot)"

if [[ ${OS} == "Windows" ]]; then
desired_sysroot=C:/tmp
else
desired_sysroot=/tmp
fi
sysroot=$(./target/debug/clippy-driver --sysroot $desired_sysroot --print sysroot)
test "$sysroot" = $desired_sysroot

sysroot=$(SYSROOT=$desired_sysroot ./target/debug/clippy-driver --print sysroot)
test "$sysroot" = $desired_sysroot

# Make sure this isn't set - clippy-driver should cope without it
unset CARGO_MANIFEST_DIR

# Run a lint and make sure it produces the expected output. It's also expected to exit with code 1
# FIXME: How to match the clippy invocation in compile-test.rs?
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/cstring.rs 2> cstring.stderr && exit 1
sed -e "s,tests/ui,\$DIR," -e "/= help/d" cstring.stderr > normalized.stderr
diff normalized.stderr tests/ui/cstring.stderr

# TODO: CLIPPY_CONF_DIR / CARGO_MANIFEST_DIR
99 changes: 99 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Clippy Test

on:
push:
# Ignore bors branches, since they are covered by `clippy_bors.yml`
branches-ignore:
- auto
- try
# Don't run Clippy tests, when only textfiles were modified
paths-ignore:
- 'COPYRIGHT'
- 'LICENSE-*'
- '**.md'
- '**.txt'
pull_request:
# Don't run Clippy tests, when only textfiles were modified
paths-ignore:
- 'COPYRIGHT'
- 'LICENSE-*'
- '**.md'
- '**.txt'

env:
RUST_BACKTRACE: 1
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
NO_FMT_TEST: 1

jobs:
base:
runs-on: ubuntu-latest

steps:
# Setup
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
with:
github_token: "${{ secrets.github_token }}"

- name: rust-toolchain
uses: actions-rs/[email protected]
with:
toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal

- name: Checkout
uses: actions/[email protected]

- name: Run cargo update
run: cargo update

- name: Cache cargo dir
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu

- name: Master Toolchain Setup
run: bash setup-toolchain.sh

# Run
- name: Set LD_LIBRARY_PATH (Linux)
run: |
SYSROOT=$(rustc --print sysroot)
echo "::set-env name=LD_LIBRARY_PATH::${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"

- name: Build
run: cargo build --features deny-warnings

- name: Test
run: cargo test --features deny-warnings

- name: Test clippy_lints
run: cargo test --features deny-warnings
working-directory: clippy_lints

- name: Test rustc_tools_util
run: cargo test --features deny-warnings
working-directory: rustc_tools_util

- name: Test clippy_dev
run: cargo test --features deny-warnings
working-directory: clippy_dev

- name: Test cargo-clippy
run: ../target/debug/cargo-clippy
working-directory: clippy_workspace_tests

- name: Test clippy-driver
run: bash .github/driver.sh
env:
OS: ${{ runner.os }}

# Cleanup
- name: Run cargo-cache --autoclean
run: |
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
cargo cache
Loading