Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.

task.recursive_file_set does not seem to accept style #135

Closed
miketheman opened this issue Apr 22, 2013 · 4 comments
Closed

task.recursive_file_set does not seem to accept style #135

miketheman opened this issue Apr 22, 2013 · 4 comments
Labels

Comments

@miketheman
Copy link

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?

@turboladen
Copy link
Owner

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. :)

@miketheman
Copy link
Author

@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. :)

@turboladen
Copy link
Owner

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!

acrmp pushed a commit to Foodcritic/foodcritic that referenced this issue May 5, 2013
Because of a bug in tailor turboladen/tailor#135 recursive_file_set
ignores style definitions. Use file_set with a capture-all path
instead.

[ci skip]
@miketheman
Copy link
Author

Appears to be resolved with #142

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants