turboladen/tailor

task.recursive_file_set does not seem to accept style

Closed this issue · 4 comments

Tailor::RakeTask.new do |task|
  task.recursive_file_set '*.rb' do |style|
    style.max_line_length 160, level: :warn
  end
end

seems to do nothing.

How should one pass global options to the Rake Task?

Yeah, you're right @miketheman--#recursive_file_set doesn't seem to do anything with the style. sad face

The recursive_file_set that you specify should, certainly, apply style to all .rb files from your current path down. Looks like it's picking up the correct files, but just not applying the style. If, however, you're talking about "global" in the sense that that should work as your base/default style settings and all other file_sets should inherit from that... I don't recall of any way to do this with tailor. If that's what you're looking for (which seems like a reasonable feature to add), could you add a separate issue in for tracking that? And if you're up for it, any suggestions for implementing that would be welcome. :)

@turboladen yep, I'm looking for effectively a .tailor file to be available within the rake_task. I think I might be better off with a .tailor for some of the "global" options for now, but you're right, I'll think about where it might make sense to put this in.
In general, I'd like to take a stab at being more helpful on this project. :)

Help would be awesome--I hate seeing issues pile up, and part of the reason (besides time) for not getting to some of them is not being quite sure how to fix/implement them. Also, I like pull requests... cough ...even for refactor/redesign stuff.

Thanks again for all of your great feedback--I swear I have every intention of tackling them at some point!

Appears to be resolved with #142