3

I love SublimeLinter for Sublime Text, but I can't figure out how to disable warnings that aren't applicable. One example I keep running into is "Warning: assigned but unused variable" for a Sinatra app. Distracting to have those lines highlighted.

Is there a way to suppress lint warnings / "errors" based on type? How about to ignore a specific instance of a warning?

Thanks!

Jay
  • 3,857
  • 2
  • 23
  • 25

2 Answers2

2

Use the per-linter ignore_match setting:

"ignore_match": [
  "assigned but unused variable"
]
Alec Thomas
  • 19,639
  • 4
  • 30
  • 24
1

SublimeLinter is just a plug-in for various linting backends and commands. It itself does not have any opinions what the source code files do.

You should check how the underlying linting engine, which seems to be a Ruby command itself in this case (https://github.com/SublimeLinter/SublimeLinter/blob/master/sublimelinter/modules/ruby.py ) handles warnings.

In the worst case you can edit the plug-in in place and give more options to ruby linting command.

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435