Docker-Ruby-Rubocop is a VSCode etension that lets you lint ruby files using rubocop on system and rubocop running inside docker containers.
- Execute Rubocop inside docker or in the host machine
- Get Lint output for files with large number of lines
This extension is created by forking a good plugin name ruby-rubocop create by the man misogi. Misogi have have provided the ruby commuity with a good linting plugin for years. His code heped me a lot while building this plugin. So, a big thanks to the friend I have never met 🤝🏽.
- Go to Vscode Extensions Tab
- Search for Docker-Ruby-Rubocop
- Click on the extension made by s035 and install.
Open Extension's Setting and follow the below steps for respective modes.
- check the "useDocker" checkbox.
- check the "disableEmptyFileCop" checkbox (if you enable this, you will receive an Lint/EmptyfileCop offence when linitng the files which are not present inside the docker container.)
- If you have an rubocop config file inside the docker, please specify the rubocop config file path inside the docker container.
- Uncheck the useDocker checkbox.
- Uncheck the disableEmptyFileCop.
- Provide the path where rubocop is available in the Execution Path Input Box.
- Provide the path for rubocop config file on system, if rubocop config file is available.
If you want rubocop to be ran on every save, check the execute on save checkbox.
If you face any issues or problemswhen using the extension, please feel free to create an issue.