Releases: yorickpeterse/ruby-lint
2.0.3
- 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 withArray#+
in
RubyObject#determine_parent
, leading to a small performance boost, see
http://git.io/1SIguw for more information.
2.0.2
- 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 thathexdigest
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
- The exit status of ruby-lint is set to 1 when there is data to report. See
https://github.com/YorickPeterse/ruby-lint/issues/117 for more info.
2.0.0
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:
- A refactored and less confusing CLI.
- The caching system has been removed as it was too problematic.
- 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
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
andast
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
individualRubyLint::VirtualMachine
instance. - Updated the version of the parser Gem to use.
The following bugs/issues have been resolved in this release:
- https://github.com/YorickPeterse/ruby-lint/issues/89
- https://github.com/YorickPeterse/ruby-lint/issues/85
- https://github.com/YorickPeterse/ruby-lint/issues/91
- https://github.com/YorickPeterse/ruby-lint/issues/92
- https://github.com/YorickPeterse/ruby-lint/issues/93
- https://github.com/YorickPeterse/ruby-lint/issues/94
- https://github.com/YorickPeterse/ruby-lint/issues/100
- https://github.com/YorickPeterse/ruby-lint/issues/101
- https://github.com/YorickPeterse/ruby-lint/issues/102
1.0.3
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
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
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
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
A small release that only includes 3 changes:
- A presenter specifically designed for Syntastic
- STDOUT/STDERR/STDIN definitions are now treated as instances meaning method
calls such asreopen
are processed correctly. - 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.