Closed max-curzi closed 1 month ago
The paths in diagnosticFilters
are a little unique. I think they're relative to rootDir rather than relative to the folder where the bsconfig.json resides. Can you try rewriting the diagnosticFilters with that in mind, see if that works? diagnosticFilters definitely apply to bslint diagnostics as well.
I tried all sorts of paths in bsconfig.json (with and without the "src" field in diagnosticFilters).
diagnosticFilters: [
{"src": <many different path variations>, "codes": [1001]}
]
and tried moving bsconfig+bslint in the root folder (rather than the relevant subfolder), adjusting paths as I went.
I did notice that when I had file mappings like
"files": [ {
"src": "../foo/Foo.brs",
"dest": "foobar/foo.brs"
},
then in diagnosticFilters I had to use
{"src": "../foo/**", "codes": [1001]}
but that only worked for the brs(1001)
and not the brs(LINT1001)
errors.
You need to specify the lint code too:
{"src": "../foo/**", "codes": [1001, "LINT1001"]}
ah that didn't work originally, but that was before I tweaked the "src"! I think I got it right now, thanks!
Great! Glad you got it working.
I've added a simple bslint.json with everything disabled, except for
unsafe-path-loop
which returns a very useful LINT1003 error.However, bslint still returns LINT1001 errors. Note that these look different than the 1001 errors displayed when not using the bslint plugin.
I can filter the (1001) with bsconfig.json diagnosticFilters, but I don't know how to filter out the LINT1001 ones, maybe the "rules" section is incomplete?
This is my bslint.json