rokucommunity / bslint

A linter for BrightScript and BrighterScript.
MIT License
28 stars 15 forks source link

disallow keywords #6

Closed georgejecook closed 4 years ago

georgejecook commented 4 years ago

I put annotations in my code for rooibos, like '@Only '@Ignore

would be awesome to have a rule where I could say - warn if ANY of these key-words are in the code.

elsassph commented 4 years ago

Can you provide a more detailed example?

TwitchBronBron commented 4 years ago

@georgejecook this feels a little too specific to your rooibos project. you're defining a custom comment-based annotation '@someAnnotation. I think you should consider writing your own brighterscript plugin to catch those, as I don't see many other people benefiting from a rule like this.

georgejecook commented 4 years ago

well, the idea would be for any particular words, not just '@only.. maybe a regex of cuss words?..

georgejecook commented 4 years ago

you guys dont' want a details list of rude words, do you? :P

elsassph commented 4 years ago

As I said, I'd like a more detailed description of the feature. What is the goal? Is an annotation the best syntax for it? Etc. Maybe it indeed would be a legitimate lint rule, or best handled as a separate plugin.

georgejecook commented 4 years ago

I'll write something up tonight.

georgejecook commented 4 years ago

on second thoughts, @TwitchBronBron is probably right.. a generic - "report an error if this word is in the code" is not a good idea. I can write a custom plugin that does the same thing.