Skip to content

Crash for projects with locale subfolders without a .yml file #3

@oliverklee

Description

@oliverklee

https://github.com/braingourmets/gethdo/releases/tag/test%2Fyaml-lint

In this project, we have nested subfolders for the locales. Particularly, we currently have EN and DE locale files directly in the config/locales/ folder, and then some files in config/locales/views/home/index. Running yaml-validator on this causes a crash:

klee@gonzales:~/eclipse/gethdo$ yaml-validator validate config/locales/
Validating config/locales/...

/home/klee/.rvm/gems/ruby-2.0.0-p247/gems/yaml-validator-0.1.9/lib/yaml-validator.rb:223:in get_all_variables': undefined methodeach' for "":String (NoMethodError)
from /home/klee/.rvm/gems/ruby-2.0.0-p247/gems/yaml-validator-0.1.9/lib/yaml-validator.rb:29:in en_with_vars' from /home/klee/.rvm/gems/ruby-2.0.0-p247/gems/yaml-validator-0.1.9/lib/yaml-validator.rb:33:invalidate'
from /home/klee/.rvm/gems/ruby-2.0.0-p247/gems/yaml-validator-0.1.9/bin/yaml-validator:15:in validate' from /home/klee/.rvm/gems/ruby-2.0.0-p247@global/gems/thor-0.18.1/lib/thor/command.rb:27:inrun'
from /home/klee/.rvm/gems/ruby-2.0.0-p247@global/gems/thor-0.18.1/lib/thor/invocation.rb:120:in invoke_command' from /home/klee/.rvm/gems/ruby-2.0.0-p247@global/gems/thor-0.18.1/lib/thor.rb:363:indispatch'
from /home/klee/.rvm/gems/ruby-2.0.0-p247@global/gems/thor-0.18.1/lib/thor/base.rb:439:in start' from /home/klee/.rvm/gems/ruby-2.0.0-p247/gems/yaml-validator-0.1.9/bin/yaml-validator:34:in<top (required)>'
from /home/klee/.rvm/gems/ruby-2.0.0-p247/bin/yaml-validator:23:in load' from /home/klee/.rvm/gems/ruby-2.0.0-p247/bin/yaml-validator:23:in

'
from /home/klee/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in eval' from /home/klee/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions