turboladen / tailor

A RubyGem that allows for checking standard styling of Ruby files.
146 stars 18 forks source link

Can't seem to make config file work #116

Open jaymzh opened 11 years ago

jaymzh commented 11 years ago

Maybe I'm just retarded, but I can't seem to make the config file work. I have this config file:

Tailor.config do |config|
  config.formatters "text"
  config.recursive_file_set '*.rb' do |style|
    style.indentation_spaces off, level: :off
  end
end

in my ~/.tailor - the docs are a bit inconsistent, so I've also symlinked ~/.tailorrc to that file.

Now when I run tailor against an example ruby file:

$ tailor default.rb
#------------------------------------------------------------------------------#
# File:
#   default.rb
#
# File Set:
#   default
#
# Problems:
#  1.
#    * position:  16:3
#    * property:  indentation_spaces
#    * message:   Line is indented to column 3, but should be at 2.
...

I even tried passing in -c ~/talior and that didn't work.

Finally I tried --indentation-spaces=off and that worked.

jaymzh commented 11 years ago

Also, I tried many incarnations of that line:

style.indentation_spaces 2, level: :off, style.indentation_spaces off, level: :error, style.indentation_spaces off, level: :off

turboladen commented 11 years ago

I've had some issues with this as well.