cypher / git-ruby-syntax-check

Checks the syntax of all changed ruby files is valid before allowing a commit
MIT License
70 stars 16 forks source link

invalid trim mode " -" #8

Open NielsKSchjoedt opened 10 years ago

NielsKSchjoedt commented 10 years ago

Getting the following error, even when the file is empty:

config/recipes/templates/sidekiq/worker.yml.erb:
invalid trim mode " -"
erb [switches] [inputfile]
  -x               print ruby script
  -n               print ruby script with line number
  -v               enable verbose mode
  -d               set $DEBUG to true
  -r library       load a library
  -S safe_level    set $SAFE (0..4)
  -E ex[:in]       set default external/internal encodings
  -U               set default encoding to UTF-8.
  -T trim_mode     specify trim_mode (0..2, -)
  -P               ignore lines which start with "%"
NielsKSchjoedt commented 10 years ago

Additionally the setting the git config --bool hooks.skip-erb-files true gives me:

.git/hooks/pre-commit:50:in `block in <main>': unexpected return (LocalJumpError)
    from .git/hooks/pre-commit:46:in `each'
    from .git/hooks/pre-commit:46:in `<main>'
 (1)

I think return should be changed to next