Unexpected behavior of Reek::Source::from_pathlist(paths)
Reported by Gabriel Miretti | April 5th, 2009 @ 10:32 PM
According to rdoc: Reek::Source::from_pathlist(paths) Factory method: creates a Source object from an array of file paths. No source code is actually parsed until the report is accessed.
But actually Reek::Source::from_pathlist(paths) creates a SourceList object, so when the report is accessed, an String object is obtained, instead of a Report object, as expected for a Source object.
Maybe only the documentation is wrong and this is the expected behaviour.
In my case, I want to check a set of files and obtain one report that provides me a size method.
Comments and changes to this ticket
-
Kevin Rutherford April 6th, 2009 @ 08:30 AM
- Assigned user set to Kevin Rutherford
- State changed from new to open
-
Kevin Rutherford April 6th, 2009 @ 08:18 PM
The documentation is correct; this is a defect in SourceList. Its #report method should return an object that behaves like a Report.
-
Kevin Rutherford April 6th, 2009 @ 08:39 PM
- State changed from open to resolved
(from [f2caf4a0df265eba818f3c071ea96df597f4478e]) SourceList now has a ReportList [#36 state:resolved] http://github.com/kevinrutherfor...
-
Kevin Rutherford April 6th, 2009 @ 08:41 PM
Resolved in release 1.0.1, available from github.com/kevinrutherford/reek
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Defects and feature requests for <a href="http://wiki.github.com/kevinrutherford/reek">Reek</a>, the Ruby code smell detector
People watching this ticket
Tags
Referenced by
- 36 Unexpected behavior of Reek::Source::from_pathlist(paths) (from [f2caf4a0df265eba818f3c071ea96df597f4478e]) SourceL...