-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Steps to reproduce:
- Install the latest version of this plugin and Docker
- Create a shell script which runs the Docker command to run Rubocop from a container:
#!/usr/bin/env bash
docker run --rm -it -v ${PWD}:/code registry.gitlab.com/pipeline-components/rubocop:latest $@
- Make it executable with
chmod +x
- Configure this plugin with:
{
"rubocop_command": "/usr/local/bin/rubocop",
"check_for_rvm": false
}
- Check if it is working:
$ rubocop --version
1.52.1
$ rubocop my_ruby_file.rb
Inspecting 1 file
C
Offenses:
my_ruby_file.rb:45:3: C: Metrics/MethodLength: Method has too many lines. [12/10]
def move_screenshot_html_to_public_folder_as(filename) ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Now open the Ruby file in Sublime Text
No Rubocop offenses reported in ST, and nothing is printed in the ST console, no idea what is going wrong.
I have updated my script in order to write into a file the command that is going to be executed, but no log file appears, like if the script is not ran at all.
BTW when I set a wrong path as rubocop_command
, I do have an error in ST stating the given path doesn't exist.
Metadata
Metadata
Assignees
Labels
No labels