-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rubocop returns empty output! please check configuration. #148
Comments
I had this same problem, and it was happening because I was in a ruby project that didn't have Gemfile. So just go to your project's folder and run bundle init (it will add an empty Gemfile and rubocop will be happy!) You might need to restart VSCode. |
This issue is annoying me so much. I had to lookup how to and debugged the extension a bit lol I think it has something to do with vscode/extension's process.env["PATH"]
'/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands'
process.env["PWD"]
'/' On the side, I made a quick node project and ran the exact command using same Here is my test code - `app.js` var cp = require('child_process');
var fs = require('fs');
const options = {
cwd: '/Users/panne/Documents/Personal/algos',
input: fs.readFileSync('/Users/panne/Documents/Personal/algos/lib/algos.rb', 'utf-8')
};
const args = [
'/Users/panne/Documents/Personal/algos/lib/algos.rb',
'--config',
'/Users/panne/Documents/Personal/algos/.rubocop.yml',
'--auto-correct']
const stdout = cp.execSync('/Users/panne/Documents/Personal/algos/bin/rubocop', args, options).toString();
console.log(stdout); I am leaning more towards it's vscode's issue, because I am seeing the exact same issue with Apologies in advance for tagging you @misogi, would love to hear your thoughts or give me any pointers how to figure out to set correct Update: Opened up this issue with vscode - microsoft/vscode#139639 And SO thread for more help - https://stackoverflow.com/questions/70453255/vscode-read-environment-vars-on-launch |
One year later, same problem |
Most of the time when it happens when you update rubocop in your gemfile.lock, but vscode hasn't been reloaded since then (just happened to me, I never close vscode) Make sure you ran Then hard reload vs code (quit + re-start), and it's gone |
i have been this problem to, i made all kind of fixes and nothing yet |
Always launching VS Code from the terminal via |
I have RuboCop installed globally (i believe). This VSCode notification pops up when I clone into a project that does not have rubocop in the gemfile. I add Rubocop to the project by running |
This is the right thing to do. Fixed many problems for me. |
After updating vscode, I started receiving this error message
If I do
bundle exec rubocop file_name
rubocop will work.I have these in the configuration file.
any idea, please!
The text was updated successfully, but these errors were encountered: