Skip to content

Commit

Permalink
add support for ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
Bennet-Sunder committed Mar 1, 2024
1 parent fe927d1 commit 8563a07
Show file tree
Hide file tree
Showing 6 changed files with 576 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ tree-sitter-java = "0.20.2"
# TODO: Update after: https://github.com/alex-pinkus/tree-sitter-swift/issues/278 resolves
tree-sitter-swift = { git = "https://github.com/satyam1749/tree-sitter-swift.git", rev = "08a28993599f1968bc81631a89690503e1db7704" }
tree-sitter-python = "0.20.2"
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git" }
tree-sitter-typescript = "0.20.1"
# TODO: Update after https://github.com/tree-sitter/tree-sitter-go/pull/103 lands
tree-sitter-go = { git = "https://github.com/uber/tree-sitter-go.git", rev = "f8cffd0af7baaf7bf6062e403efe7c0d06319c41" }
Expand Down
28 changes: 28 additions & 0 deletions src/cleanup_rules/ruby/edges.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[[edges]]
scope = "Parent"
from = "replace_expression_with_boolean_literal"
to = ["boolean_literal_cleanup"]

[[edges]]
scope = "Parent"
from = "replace_expression_with_boolean_literal"
to = ["block_removal"]


[[edges]]
scope = "Parent"
from = "boolean_literal_cleanup"
to = ["boolean_expression_simplify", "statement_cleanup"]

[[edges]]
scope = "Parent"
from = "boolean_expression_simplify"
to = ["boolean_literal_cleanup"]

[[edges]]
scope = "Parent"
from = "statement_cleanup"
to = [
"if_cleanup"
]

Loading

0 comments on commit 8563a07

Please sign in to comment.