rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
110 stars 40 forks source link

Ability to ignore linting sub folders #98

Closed vbasky closed 5 years ago

vbasky commented 5 years ago

I would like to have the capability to ignore linting in sub folders through a configuration setting probably.

The project that I am dealing with has quite a few SDK's which have poor linting standards and not worthwhile my time. I would like VSCode to happily ignore them if they can.

TwitchBronBron commented 5 years ago

So, this project isn't intended to be a linter. It's a language validator. So any errors you encounter will cause compile-time or runtime errors when running on a roku, or they are a byproduct of a bug in this project that should be fixed in this project.

All of the errors you have submitted so far have been bugs in this extension.

I don't see much value in adding a "ignore actual code errors" on a subdirectory basis, but I am willing to have a discussion about it if there are valid reasons.

Can you provide some examples of "lint errors" that you are seeing that you would like to ignore?

vbasky commented 5 years ago

My project requires that I include third party analytics libraries like Adobe, Conviva, Oztam etc. The SDK's themselves written by other companies don't necessarily adhere to following Brightscript standards

Some of the errors shown by the IDE on linting on third party libraries

screen shot 2019-02-25 at 12 24 31 pm screen shot 2019-02-25 at 12 25 00 pm screen shot 2019-02-25 at 12 25 56 pm screen shot 2019-02-25 at 12 26 53 pm

Either all of them are genuine bugs or anomalies by the developer which doesn't deserve my attention.

TwitchBronBron commented 5 years ago

Thanks for the examples, that helps a lot!

These are all bugs in the brs parser. It's failing on valid BrightScript syntax that it does not yet support. The first two screenshots (result$ and result%) are tracked by this issue.

I opened this issue for m.["_uuid"], and this issue for Library "v30/bslCore.brs".

Once brs starts recognizing these as valid syntax, the errors should go away.

In the mean time, if you are sick of seeing those errors, you can add ignoreErrorCodes: [1000] to your brsconfig.json file. Keep in mind, error code 1000 is a catchall for every syntax error, so it will exclude any actual syntax errors in your code.

Just to let you know, the language validation for this project is VERY new, so most of these errors you are seeing are just growing pains of a brand new project. I really appreciate you taking the time to try it out and report the issues. Keep them coming!

vbasky commented 5 years ago

I would like to contribute in my spare time, but its a hard spot getting my feet wet on this codebase without developer docs.

TwitchBronBron commented 5 years ago

Closing this issue as it is not something this project will investigate at this time. Feel free to add to the discussion if you have any other justifications.