Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0a20ab6
Revert "Remove `unreachable-code` feature (#9463)"
augustelalande Apr 11, 2024
4a716d6
remove feature gate
augustelalande Apr 11, 2024
b615c91
fix up
augustelalande Apr 11, 2024
a8023c5
mark preview
augustelalande Apr 11, 2024
ddaaee4
Implement post_processing to handle `break` and `continue` in loops w…
augustelalande Apr 13, 2024
b8ca509
Always get an after_block to avoid having to get one for each branch …
augustelalande Apr 14, 2024
64dbcc3
Fix #8958
augustelalande Apr 15, 2024
97aa6f0
fix infinite recursion
augustelalande Apr 15, 2024
ef0a913
Always close the loop
augustelalande Apr 15, 2024
cc3b083
fix handling of asserts in postprocessing
augustelalande Apr 16, 2024
0afcafa
initial implementation of try statement handling
augustelalande Apr 17, 2024
cc56b59
clean up docs
augustelalande Apr 20, 2024
ede5312
always process finally
augustelalande Apr 21, 2024
439bf09
these were fixed
augustelalande Apr 21, 2024
c293600
add cfg tests for try
augustelalande Apr 21, 2024
0b9512a
clippy
augustelalande Apr 21, 2024
91be932
execute blank `except` unconditionally
augustelalande Apr 21, 2024
a1e1fbf
process with statements
augustelalande Apr 21, 2024
1d97810
this was fixed
augustelalande Apr 21, 2024
91da715
maybe fall through with statement on error
augustelalande Apr 21, 2024
4978d06
remove `force_next_block` which would change the flow incorrectly
augustelalande Apr 21, 2024
619d710
improve processing of finallys
augustelalande Apr 22, 2024
97d560e
Fix clippy warnings
MichaReiser Aug 5, 2024
e8c7ebb
update message
augustelalande Aug 26, 2024
6c450c2
remove bitmap, use a flag on the blocks themselves
augustelalande Aug 26, 2024
f7e1e21
clippy
augustelalande Aug 26, 2024
acb07bb
add nested for loop tests with break and continue
augustelalande Aug 26, 2024
6536e43
add comments for post_processing
augustelalande Aug 26, 2024
d3807aa
highlight all statements in block
augustelalande Aug 26, 2024
2d76c51
fix overflow error, although this exposes another issue; will fix later
augustelalande Aug 27, 2024
64c9233
use BasicBlockKind
augustelalande Sep 5, 2024
e212ee3
do not re-use exception blocks for proper handling of finally
augustelalande Sep 5, 2024
b066bec
add another test case
augustelalande Sep 5, 2024
c96743e
clippy
augustelalande Sep 5, 2024
3f58cac
simplify handling of match statements
augustelalande Sep 5, 2024
902c123
rename conditions
augustelalande Sep 5, 2024
153c3b0
improve documentation
augustelalande Sep 5, 2024
be78736
don't assume loop body has any statements
augustelalande Sep 5, 2024
90d0551
format
augustelalande Sep 5, 2024
63efc1c
documentation
augustelalande Sep 5, 2024
fa84ffa
clippy
augustelalande Sep 5, 2024
1417363
merge blocks
augustelalande Aug 26, 2024
6a2be73
combine nearby violations into one
augustelalande Sep 5, 2024
70c414c
clippy
augustelalande Sep 5, 2024
c207f4c
sort by range start
augustelalande Sep 5, 2024
700b732
clippy
augustelalande Sep 5, 2024
902d641
use ViolationMetadata derive macro
dylwil3 Jan 2, 2025
5901292
clippy
dylwil3 Jan 2, 2025
9d47451
more aggressive clippy
dylwil3 Jan 2, 2025
d13ff6a
move rule to pylint
dylwil3 Jan 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clippy
  • Loading branch information
augustelalande authored and dylwil3 committed Jan 2, 2025
commit 700b7326929e7a316850378dc4065d57ec8eee08
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/rules/ruff/rules/unreachable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub(crate) fn in_function(name: &Identifier, body: &[Stmt]) -> Vec<Diagnostic> {

// Combine sequential unreachable blocks
let mut blocks = basic_blocks.blocks.raw;
blocks.sort_by(|a, b| a.start().to_u32().cmp(&b.start().to_u32()));
blocks.sort_by_key(|a| a.start().to_u32());
let mut start = None;
let mut end = None;
for block in blocks {
Expand Down