Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Unexpected behavior of Reek::Source::from_pathlist(paths)

#36

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.

Reported by Gabriel Miretti · April 5th, 2009 @ 10:32 PM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. Kevin Rutherford
    Kevin Rutherford
    • Assigned user set to Kevin Rutherford
    • State changed from new to open

    April 6th, 2009 @ 08:30 AM

  2. Kevin Rutherford
    Kevin Rutherford

    The documentation is correct; this is a defect in SourceList. Its #report method should return an object that behaves like a Report.

    April 6th, 2009 @ 08:18 PM

  3. Kevin Rutherford
    Kevin Rutherford
    • State changed from open to resolved

    (from [f2caf4a0df265eba818f3c071ea96df597f4478e]) SourceList now has a ReportList [#36 state:resolved] http://github.com/kevinrutherfor...

    April 6th, 2009 @ 08:39 PM

  4. Kevin Rutherford
    Kevin Rutherford

    Resolved in release 1.0.1, available from github.com/kevinrutherford/reek

    April 6th, 2009 @ 08:41 PM

  5. Gabriel Miretti
    Gabriel Miretti
    • Assigned user cleared.

    Wow! That was fast!

    Thanks.

    April 6th, 2009 @ 09:20 PM

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.