Open brunoprietog opened 3 years ago
It doesn't seem like Solargraph's formatting is honoring Rubocop's Exclude
list. Even if a file is excluded and bundle exec rubocop
reports no errors, Solargraph still wants to run the file through Rubocop and format it on save, etc.
There is a know issue on the vscode-ruby plugin where it doesn't honor excluides.
Be sure solargraph is doing the formatting and not vscode. I'm currently in a state where I though solargraphi was running but it was just VSCode's built in language server and using rubocop directly.
Thanks! I uninstalled ruby and vscode-ruby because I hardly used it. I also removed all settings related to those 2 extensions in settings.json. Even so, it still doesn't work. Did you manage to fix it somehow?
I did it was the combination of
"[ruby]": {
"editor.defaultFormatter": "castwide.solargraph"
}
"ruby.useLanguageServer": false
Strange, it still doesn't work. Are you using solargraph with bundler?
Hello! I have a Rails project with custom rules from Rubocop. However, it seems that solargraph does not respect those rules. The errors I get when checking rubocop from the terminal and from vs code are different, and I have conflicts when formatting the files. For example, even though I excluded the db/schema.rb file, when I open it, vs code still shows about 500 errors. I get the same thing in other files, and the formatter causes some defined rules to be broken.
These are my rubocop rules:
.rubocop.yml:
.rubocop_raw.yml:
.rubocop_todo.yml:
I ran solargraph config in the project directory, restarted solargraph in VS Code and everything remains the same. The reporters are configured in rubocop, as the default Solargrapf config file comes.
I have another project with simpler rules and the same thing happens to me.
.rubocop.yml:
What could be going on? Is it a bug or am I doing something wrong?
Thanks!