Repository navigation
Maintained fork of tree-sitter-ruby. Changes since 0.26.0:
Parsing
- Checked on all 78,129 Ruby files of Rails, Discourse, GitLab and Mastodon: every one now agrees with Prism. Two fixes came out of it:
- a call with arguments after a command's do block, as RSpec writes it:
expect(x).to receive(:y) do … end.and_return(z), and chains likeend.c(1).d; + 1.abswith a space is+(1.abs), as in Ruby.
- a call with arguments after a command's do block, as RSpec writes it:
- A string key in a hash pattern binds its name: after
in {"name":},name +1isname + 1. - Heredocs: a line that repeats the end word (
EOSEOS) and a lone carriage return no longer end the body.
Queries
highlights.scm: the implicit block parametersitand_1to_9are parameters, no longer method calls.it "..." doin RSpec stays a call.locals.scm:in {name:},in {"name":},in (x)andin _a | _bdefine their names, so later uses are variables.
Quality and security
- The tests run 97.7 % of the scanner's lines and 92.4 % of its branches; CI fails if that drops.
- The scanner builds without warnings under gcc and clang (
-Wall -Wextra -Wpedantic -Wshadow -Werror). - Fuzzing with ClusterFuzzLite: five minutes per sanitizer on each pull request that touches the parser, an hour each every night.
- OpenSSF Best Practices badge (passing) and an OpenSSF Scorecard; SECURITY.md with private vulnerability reporting, and CONTRIBUTING.md.
- Performance history of every release since upstream 0.23.1.
On npm (@magikdidi24/tree-sitter-ruby), crates.io and PyPI (tree-sitter-ruby-magikdidi24).
NOTE: Download tree-sitter-ruby.tar.gz for the complete source code.