PSA: QLTY Cloud Custom Rubocop Cops need to be listed as config_files and only the basename, not the relative path! #2649
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
PSA for those who may encounter the same issue. If you have any custom Rubocop cops, the way that you reference them in the
qlty.tomlis via therubocopplugin'sconfig_filesarray, but ONLY as a basename for the file.For example, for a file that is in
lib/cops/style/my_custom_cop.rb, you would ONLY put the basenamemy_custom_cop.rbinto the config_files.If you incorrectly use a full relative path, then Rubocop will fail to load the cop in the QLTY Cloud sandboxed runner.
How to reproduce (optional)
Using a relative path in Rubocop plugin
config_filesarray causes a build failure.Expected behavior (optional)
Using only the file's base name, even if it's within subdirectories, will work correctly.
CLI Version
QLTY Cloud
Information about Qlty configuration and environment (optional)
No response
Beta Was this translation helpful? Give feedback.
All reactions