At work, my team created our own little scripting language using Ruby and the Treetop parser. The syntax for the language itself is very similar to Ruby.
I'm using Ruby and the Ruby extension for syntax highlighting for our files for this language, but the Ruby extension throws errors because the language isn't actually Ruby.
Is there a way to disable error checking for specific file types? Should I fork the Ruby extension?
Thanks.
Go to the menu File -> Preferences -> Settings (Or open directly with Command + , or Ctrl + , ). Then in the search box at the top of the window, search for pylint Args . Click on the button Add item and add the line --disable=W .
To disable the Restricted mode status bar entry: Right click in the status bar. Uncheck the workspace trust entry.
You can disable it by configuring your own VSCode setting in your project root. I'm using Ruby extension with RuboCop linter. Here are the steps:
touch .vscode/settings.json
..vscode/settings.json
:{
"ruby.lint": {
"rubocop": true
}
}
.rubocop.yml
file and paste the default settings from https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml
NewCops
either enable
or disable
.Exclude
. Let's say the excluded extension is .my
. Something like this:Exclude:
- 'node_modules/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
- '.git/**/*'
- '**/*.my'
As an evidence, here is how my .my
looks like before I applied this configurations while using Ruby syntax highlighting with RuboCop linter enabled.
And, here is how it looks like after I configured it just like I explained above:
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With