Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A semantic indexer for Ruby with interprocedual type inference

NotificationsYou must be signed in to change notification settings

yinwang0/rubysonar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

RubySonar is a semantic indexer for Ruby, which doesinterprocedural analysis to infer types. It is one of the underlyingtechnologies that powers the code search siteSourcegraph.

RubySonar is modeled afterPySonar2, which does a similaranalysis for Python and has been in use by Sourcegraph and Google. To understandits technical properties, please refer to my blog posts:

Demo

How to build

mvn package

System Requirements

  • irb

RubySonar uses theirb interpreter to parse Ruby code, so please make sure youhave it installed and pointed to by thePATH environment variable.

How to use

RubySonar is mainly designed as a library for IDEs and other developer tools, soits interface may not be as appealing as an end-user tool, but for yourunderstanding of the library's capabilities, a reasonably nice demo program hasbeen built.

You can build a simple "code-browser" of your ruby code with the followingcommand line:

java -jar target/rubysonar-0.1-SNAPSHOT.jar /path/to/project ./html

This will take a few minutes. You should find some interactive HTML files insidethehtml directory after this process.

License (BSD Style)

RubySonar - an advanced semantic indexer for Ruby

Copyright (c) 2013-2019 Yin Wang

Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.

  3. The name of the author may not be used to endorse or promote products derivedfrom this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIEDWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENTSHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENTOF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESSINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER INCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISINGIN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITYOF SUCH DAMAGE.

About

A semantic indexer for Ruby with interprocedual type inference

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors10

Languages


[8]ページ先頭

©2009-2025 Movatter.jp