#26 ✓resolved
Kevin Rutherford

handle directories as cmdline args

Reported by Kevin Rutherford | March 8th, 2009 @ 02:17 PM

From Ashley Moran, via email:

"Any chance you could make it take directories?"

Comments and changes to this ticket

  • Kevin Rutherford

    Kevin Rutherford March 8th, 2009 @ 02:25 PM

    In fact this is what Reek 0.2 used to do and I took it out. Let's do some design. If a commandline argument is a directory Reek should look at:

    • all files called DIR/*.rb ?
    • all files called DIR/*/.rb ?

    So should this be a config-file option? What about a list of files to be excluded (eg. *_spec.rb)?

    Currently Reek::RakeTask has an option to specify the set of files, and globs are permitted. So in a way this is already supported. Plus, most operating systems provide a way to find loads of files and pass them to the commandline, eg:

    
    $ reek `find DIR -name \*.rb -print`
    
  • Kevin Rutherford

    Kevin Rutherford March 8th, 2009 @ 02:26 PM

    • State changed from “new” to “resolved”

    Closed, because there are already a couple of viable alternatives.

  • Kevin Rutherford

    Kevin Rutherford March 8th, 2009 @ 04:11 PM

    
    "app/models".should_not reek
    

    is very sexy. Is

    
    "app/models/**/*.rb".should_not reek
    

    any less so?

  • Kevin Rutherford

    Kevin Rutherford March 24th, 2009 @ 04:07 PM

    Yes, I'll add some more factory methods to Source. In a few days...

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.

New-ticket Create new ticket

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

Pages