Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

Releases: yorickpeterse/ruby-lint

2.0.3

09 Jan 19:08
Compare
Choose a tag to compare
  • ruby-lint now adds errors for certain iteration/loop keywords that are used
    outside of loops. See http://git.io/dsVzhA for more information.
  • The FileScanner was modified to allow it to process directories containing
    dashes, see http://git.io/eNiq9A for more information.
  • Definitions for Mongoid, Sinatra, win32ole, glib2, gtk3, libxml, RubyTree, and
    the ALM REST API were added.
  • Usage of Array#| has been replaced with Array#+ in
    RubyObject#determine_parent, leading to a small performance boost, see
    http://git.io/1SIguw for more information.

2.0.2

06 Aug 08:43
Compare
Choose a tag to compare
  • Definitions for Celluloid have been added.
  • The definitions for Math have been updated to include constants such as
    Math::PI
  • The definitions for Digest have been updated so that hexdigest is
    processed correctly.
  • Users can now specify a custom configuration file using the -c and/or
    --config option. See https://github.com/YorickPeterse/ruby-lint/issues/124
    for more information.

2.0.1

11 Jun 15:02
Compare
Choose a tag to compare

2.0.0

06 Jun 15:06
Compare
Choose a tag to compare

Although the version number might suggest otherwise this is a rather modest
release compared to previous releases.

There are 3 big changes in this release:

  1. A refactored and less confusing CLI.
  2. The caching system has been removed as it was too problematic.
  3. The API used for registering analysis classes has been changed to make it
    easier to register custom classes.

The first change is not backwards compatible with previous releases of
ruby-lint, hence the mayor version increase.

The following other changes are included in this release:

  • Fuzzy file matching when scanning for external files has been removed. This
    was too problematic and would cause problems such as
    https://github.com/YorickPeterse/ruby-lint/issues/105.
  • Definitions for Minitest have been added.
  • Proper handling of methods called on block return values.
  • Constant paths with variables in them are handled properly.
  • Diagnostics emitted by the parser Gem are re-used properly by ruby-lint
    instead of always being displayed as errors.
  • ARGF is handled with extra care so that ruby-lint doesn't throw tons of false
    positives.
  • Debug output has been removed from the CLI, it will be replaced with a better
    system in the near future.

1.1.0

02 Feb 19:27
Compare
Choose a tag to compare

This release changes the way the definitions system works so that it no longer
stores a set of global definition objects. Instead "templates" (so to speak)
are provided which are applied to individual RubyLint::VirtualMachine
instances. This makes it much easier to analyze code that patches core classes
such as String or Fixnum.

There have also been various other, smaller changes. The ones worth mentioning
as following:

  • A new analysis class, UselessEqualityChecks, has been added. This class adds
    warnings for expressions such as "foo" == true.
  • A Rake task class has been added, making it easier to integrate ruby-lint in
    a Rakefile.
  • The CLI has been cleaned up and the plot and ast commands have been
    removed. A new command, cache has been introduced to manage ruby-lint cache
    files more easily.
  • A bug has been fixed that would prevent ruby-lint from properly loading files
    from multiple directories, see Git commit
    292bb2b73aa6adfdc750fb846884025afc841393.
  • Definitions have been added for Devise and Nokogiri.
  • Most built-in definitions have been re-generated.
  • Definitions system has been overhauled to no longer use a global state and a
    complex data copying system. Instead the definitions are applied to every
    individual RubyLint::VirtualMachine instance.
  • Updated the version of the parser Gem to use.

The following bugs/issues have been resolved in this release:

1.0.3

23 Dec 21:25
Compare
Choose a tag to compare
  • self is now defined as a class and instance method to ensure that the right
    data is used in these two scopes. See
    28f604ded884be2e43ef7ce93892a3cade4c93d7 for a more in depth explanation.
  • Block arguments passed to methods are now ignored by the ArgumentAmount
    analysis class.
  • Configuration objects are now passed to analysis classes.
  • ruby-lint can now parse empty Ruby files! Previously this would crash the
    parser.
  • Range now inherits from Enumerable.
  • The definitions for Array have been re-generated.
  • Fix for searching for Ruby files when no directories were given to the file
    scanner class. Previously this would cause ruby-lint to start scanning from
    /. See https://github.com/YorickPeterse/ruby-lint/issues/83 for more
    information.

1.0.2

18 Dec 23:27
Compare
Choose a tag to compare

This release changes the default file scanner directories from $PWD to
$PWD/app and $PWD/lib as the former proved to be too much trouble. This
release also changes the pre-globbing of the file scanner so that it only
starts looking for files when actually needed.

1.0.1

15 Dec 21:53
Compare
Choose a tag to compare

A small bugfix release that contains the following changes/fixes:

  • Anonymous splat arguments (def foo(_); end) are now ignored by the
    UnusedVariables class.
  • Frozen definitions no longer have their members updated, see
    https://github.com/YorickPeterse/ruby-lint/issues/75 for more information.
  • ENV is now treated as an instance.
  • When re-assigning a variable the VM now updates the corresponding definition
    instead of overwriting it. This was added to fix
    https://github.com/YorickPeterse/ruby-lint/issues/77.
  • Global variables are stored in the global scope opposed to the current scope.
  • ARGV is now treated as an instance and extends Array.

1.0.0

01 Dec 14:04
Compare
Choose a tag to compare

The first stable release of ruby-lint. The 1.0 series will not introduce any
breaking API changes. The changes in this particular release are fairly small.
Initially I wanted to include the ability to skip analysis for certain
constants but I've decided to hold this off until the next release as I'm not
yet sure how I envision this feature.

Having said that, this release contains the following noteworthy changes:

  • Column numbers now start from 1 instead of 0, something I completely
    overlooked until now.
  • Performance of RubyLint::FileScanner#scan has been improved significantly
    (more on this below).
  • ruby-lint can now run analysis on an entire directory instead of only
    operating on individual files.
  • Support for Range instances when building definitions.
  • Various extra stdlib definitions have been added.
  • Support for conditional code analysis (see below).

FileScanner Performance

The performance of RubyLint::FileScanner#scan has been improved
significantly. In previous versions a call to Dir.glob was made every time
ruby-lint tried to find a constant from the local file system. This process has
been improved by retrieving all Ruby files at once and caching the results.
When performing analysis on lib/ruby-lint/virtual_machine.rb this change lead
to a reduction in execution time of about 400 milliseconds.

See http://git.io/Q5s8Lw for a more detailed description of this change.

Conditional Code Analysis

This new feature allows analysis classes themselves to determine whether or not
they should be used. This can be used to write analysis code that only runs on
Rspec files for example.

Currently ruby-lint doesn't ship with any analysis classes that use this
feature but I plan to add these in the future.

0.9.1

21 Oct 21:52
Compare
Choose a tag to compare

A small release that only includes 3 changes:

  1. A presenter specifically designed for Syntastic
  2. STDOUT/STDERR/STDIN definitions are now treated as instances meaning method
    calls such as reopen are processed correctly.
  3. ruby-lint now enforces the use of the latest Racc version as this version
    contains various performance improvements that are especially noticeable on
    Rubinius.

The Syntastic presenter is the most important addition as it allows me to
finally publish my Syntastic plugin without having to use various Vim hacks to
make it properly consume ruby-lint output.