• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    Ruby
  • License
    Other
  • Created over 13 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

See how ready your Ruby code is to run on JRuby

JRuby-Lint

See how ready your Ruby code is to run on JRuby.

JRuby-Lint is a simple tool that allows you to check your project code and configuration for common gotchas and issues that might make it difficult to run your code on JRuby.

Usage

JRuby-Lint requires JRuby to run. So, install JRuby first if you already haven't, then gem install jruby-lint.

Then simply run jrlint in your project to receive a report of places in your project where you should investigate further.

Checks

Here is a list of the current checks implemented:

  • Report usage of ObjectSpace.each_object and ObjectSpace._id2ref which are expensive and disabled by default
  • Report usage of Thread.critical, which is discouraged in favor of a plain Mutex.
  • Report known gems and libraries that use C extensions and try to provide known alternatives (Live data retrieved from https://github.com/jruby/jruby/wiki/C-Extension-Alternatives).
  • Report usage of Kernel#fork (which does not work).
  • Report behavior difference when using system('ruby'), which launches the command in-process in a new copy of the interpreter for speed

Reports

JRuby-lint supports text and html reports. Run jrlint with the option --html to generate an html report with the results.

TODO

Here is a list of checks and options we'd like to implement:

  • Report on more threading and concurrency issues/antipatterns
    • arr.each {|x| arr.delete(x) }
  • Try to detect IO/File resource usage without blocks
  • Check .gemspec files for extensions and extconf.rb for #create_makefile and warn about compiliing C extensions
  • Check whether Rails production.rb contains config.threadsafe!
  • Detect ERB files and skip them, or...
  • Detect ERB files and pre-process them to Ruby source with Erubis
  • Detect Bundler gems that have a platforms qualifier and ignore "platforms :ruby"
  • Change to use jruby-parser
  • Allow use of a comment marker to suppress individual checks

Further Down the Road

  • Arbitrary method/AST search functionality
  • Code rewriter: option to change code automatically where it's feasible
  • Revive or build an isit.jruby.org site for tracking
  • Make JRuby-Lint submit results to tracking site based on lint passes and/or test suite runs

License

JRuby-Lint is Copyright (c) 2007-2013 The JRuby project, and is released under a tri EPL/GPL/LGPL license. You can use it, redistribute it and/or modify it under the terms of the:

Eclipse Public License version 1.0 GNU General Public License version 2 GNU Lesser General Public License version 2.1

See the file LICENSE.txt in distribution for details.

More Repositories

1

jruby

JRuby, an implementation of Ruby on the JVM
Ruby
3,776
star
2

warbler

Warbler chirpily constructs .war files of your Ruby applications.
Ruby
881
star
3

activerecord-jdbc-adapter

JRuby's ActiveRecord adapter using JDBC.
Ruby
462
star
4

jruby-rack

Rack for JRuby and Java appservers
Ruby
397
star
5

joni

Java port of Oniguruma regexp library
Java
166
star
6

jrubyfx

JavaFX JRuby binding
Ruby
144
star
7

jruby-maven-plugins

maven plugin to handle rubygems in a maven way. including support for rspec, rails, cucumber, rake, etc
Java
112
star
8

heroku-buildpack-jruby

Shell
63
star
9

jruby-ossl

DEFUNCT, new repository at:
47
star
10

jruby-openssl

JRuby's OpenSSL gem
Java
45
star
11

jruby-parser

JRuby's parser customized for IDE usage
Java
44
star
12

maven_gem

A RubyGems plugin (and a utility) to install Maven artifacts as RubyGems
Ruby
40
star
13

perfer

Ruby
31
star
14

image_voodoo

ImageScience-compatible image processing for JRuby
Ruby
26
star
15

jruby-launcher

JRuby's native launcher executable
C++
24
star
16

jcodings

Java-based codings helper classes for Joni and JRuby
Java
20
star
17

using_jruby

Code samples from the "Using JRuby" book
Ruby
19
star
18

java_inline

JVM language support for RubyInline
Ruby
19
star
19

docker-jruby

Dockerfile
18
star
20

jruby-debug

JRuby-based backend for ruby-debug
Java
15
star
21

jruby-rails-templates

App templates for JRuby on Rails applications
Ruby
14
star
22

maven-tools

ruby helpers for maven related tasks
Ruby
14
star
23

jruby-mains

a couple of main methods for embedded (j)ruby inside a jar/war file
Ruby
10
star
24

jruby-ldap

JRuby/LDAP is a native LDAP implementation that uses JNDI to implement a Ruby/LDAP compatible API.
Ruby
10
star
25

bytelist

DEPRECATED: JRuby no longer maintains org.jruby.util.ByteList as a separate library
Java
10
star
26

rubygems-servlets

webapp which hosts rubygems or a proxy to rubygems. delivers gem maven artifacts as well
Java
9
star
27

jruby-demos

Demos for JRuby presentations at conferences
Ruby
8
star
28

jruby-dashboard

A Dashing dashboard for JRuby applications.
JavaScript
8
star
29

rubybench

Ruby
7
star
30

jrubyhub

Rails 3 + JRuby open source application
Ruby
7
star
31

blog.jruby.org

This is the site and data for blog.jruby.org
CSS
7
star
32

jruby-cext

The MRI C extension subsystem for JRuby
C++
7
star
33

collateral

Public collateral for JRuby
6
star
34

jruby-examples

A collection of examples to help you get the most out of JRuby
Java
5
star
35

jruby-workshop

Course material for JRuby workshop at RubyConf AU 2013
Ruby
4
star
36

jruby-startup

A collection of utilities to help improve JRuby startup time
Ruby
4
star
37

jruby-cdc

A stripped-down version of JRuby that runs on Java ME's CDC profile
Ruby
4
star
38

jruby-graal

Java
4
star
39

jruby-visualizer

Visualize JRuby's runtime in action
Ruby
4
star
40

jrubyconf.com

JRubyConf web sites and collateral
JavaScript
3
star
41

mavengem

Mavengem protocol and mavengem wagon
Ruby
3
star
42

jay

Jay grammar/parser tool
C
2
star
43

jruby-mac-installer

Ruby
2
star
44

dbm

DBM extension for JRuby
Java
2
star
45

jruby-prism

Java parts of integrating the Prism parser into JRuby. Plugs in using an SPI
Java
2
star
46

jruby-async-profiler

A Ruby gem for JRuby that installs the JVM async-profiler extension
Ruby
1
star
47

ruby-maven

Ruby
1
star
48

jzlib

JRuby's fork of the jzlib pure-Java zlib library
Java
1
star
49

gitosis-admin

Gitosis setup for jruby.org
1
star
50

jbang-catalog

Catalog for jbang command line launcher
1
star
51

jruby-readline

JRuby's `readline` library
Java
1
star