-
Notifications
You must be signed in to change notification settings - Fork 479
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
fixed sort (use & mod) method in formatter #6438
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 0 of 11 files reviewed, 5 unresolved discussions (waiting on @Arcticae, @dean-starkware, @Draggu, @mkaput, and @piotmag769)
crates/cairo-lang-formatter/src/formatter_impl.rs
line 828 at r1 (raw file):
} fn sort_inner_use_paths_in_place(multi_path: &ast::UsePathMulti, db: &dyn SyntaxGroup) {
doc.
crates/cairo-lang-formatter/src/formatter_impl.rs
line 863 at r1 (raw file):
} fn sort_and_append_group<'b>(
doc
crates/cairo-lang-formatter/src/formatter_impl.rs
line 914 at r1 (raw file):
let allowed_empty_between = syntax_node.allowed_empty_between(self.db); let internal_break_line_points_positions = syntax_node.get_internal_break_line_point_properties(self.db);
if used only in branch - init in branch.
Code quote:
let allowed_empty_between = syntax_node.allowed_empty_between(self.db);
let internal_break_line_points_positions =
syntax_node.get_internal_break_line_point_properties(self.db);
crates/cairo-lang-formatter/src/formatter_impl.rs
line 918 at r1 (raw file):
let n_children = children.len(); if self.config.sort_module_level_items { let mut sorted_children = Vec::new();
extract to function.
crates/cairo-lang-formatter/src/formatter_impl.rs
line 1038 at r1 (raw file):
// Replace the children with the sorted result: // children = sorted_children.into_iter().cloned().collect(); children.sort_by_key(|c| MovableNode::new(self.db, c));
?
Code quote:
// Replace the children with the sorted result:
// children = sorted_children.into_iter().cloned().collect();
children.sort_by_key(|c| MovableNode::new(self.db, c));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not ready for review yet.
This is why there isn't any reviewer...
It's for debugging purposes only.
Reviewable status: 0 of 11 files reviewed, 5 unresolved discussions (waiting on @Arcticae, @Draggu, @mkaput, and @piotmag769)
d311d3b
to
065bb2f
Compare
065bb2f
to
82aa450
Compare
This change is