Describe the bug
We have the following entry in our .rubocop.yml:
inherit_from: .rubocop_todo.yml
The rubocop_todo file lists offences in current project to be addressed at a latter stage, as described in https://docs.rubocop.org/rubocop/configuration.html#automatically-generated-configuration
The linter fails if such file is included with
ERROR! Found errors in [rubocop] linter!
ERROR:[Configuration file not found: /action/lib/.automation/.rubocop_todo.yml]
To Reproduce
Add a .rubocop_todo.yml in the directory specified in LINTER_RULES_PATH and add inherit_from: .rubocop_todo.yml to the main config file.
Expected behavior
Rubocop TODO should be properly loaded by the main config file.
Additional context
I have LINTER_RULES_PATH set to root directory of the project and .ruby-lint.yml -> .rubocop.yml symlink.
Thanks for opening your first issue in the super-linter repo! :tada:
I don't think this is fixed unfortunately, or perhaps I'm testing it wrong. With docker://github/super-linter:v3.2.0 I'm no longer getting the error for rubocop_todo because it fails earlier, on .rubocop.yml:
ERROR! Found errors in [rubocop] linter!
ERROR:[Configuration file not found: /action/lib/.automation/.rubocop.yml]
My settings:
- name: Super-Linter
uses: docker://github/super-linter:v3.2.0
env:
LINTER_RULES_PATH: .
RUBY_CONFIG_FILE: .rubocop.yml
VALIDATE_RUBY: true
A bit of an update for this: it seems to be working better with no RUBY_CONFIG_FILE, but a .ruby-lint.yml -> .rubocop.yml symlink as originally reported so I wonder if this is a different issue? It's still not working correctly though, it seems to be linting rubocop itself in that case:
ERROR! Found errors in [rubocop] linter!
5
ERROR:[/usr/lib/ruby/gems/2.7.0/gems/rubocop-0.74.0/lib/rubocop/config_loader_resolver.rb:76: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
6
/usr/lib/ruby/gems/2.7.0/gems/rubocop-0.74.0/lib/rubocop/config_loader_resolver.rb:84: warning: The called method `merge' is defined here
7
Inspecting 1 file
So possibly this is yet another issue.
Opened a new issue @DawidJanczak so we can track any new developments there.
+1, I'm new to super-linter and finding the paths weird when trying to point to my project's .rubocop.yml
name: Super-Linter
# Run this workflow every time a new commit pushed to your repository
on: push
jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
super-lint:
# Name the Job
name: Lint code base
# Set the type of machine to run on
runs-on: ubuntu-latest
steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
# Runs the Super-Linter action
- name: Run Super-Linter
uses: github/super-linter@v3
env:
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUBY_CONFIG_FILE: .rubocop.yml
VALIDATE_CSS: false
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_MARKDOWN: false
output
2021-01-11 22:02:03 [INFO] Gathering user validation information...
2021-01-11 22:02:03 [INFO] - Validating ALL files in code base...
2021-01-11 22:02:05 [FATAL] -> RUBY_LINTER_RULES rules file (/action/lib/.automation/.rubocop.yml) doesn't exist. Terminating...