I'm trying to lint .yaml.erb files. RuboCop seems unable to lint .erb files altogether, and although there is an erb-lint gem, it appears to only support erb that renders to html, javascript, and text files. There's a linter for yaml as well called yamllint. Is there a way to stitch these tools together or a way to configure them to handle this edge case? How do people normally handle linting files with multiple compilation steps like this?
I can't think of any reason you shouldn't be able to lint the Ruby parts of your erb
file with erb-lint
, but linting the YAML "template" is in general impossible. You could generate the actual YAML file by interpreting it and linting that though.