rokucommunity / bslint

A linter for BrightScript and BrighterScript.
MIT License
27 stars 14 forks source link

Add explicit rule for uninitialized variables #79

Closed josephjunker closed 1 year ago

josephjunker commented 1 year ago

Our team is seeing this error while running bslint:

error BSLINT1001: Using uninitialised variable 'isSecondaryTemplate' when this file is included in scope 'components/core/Pages/BasePage.xml'

This is for a situation that should 100% be an error for a production deploy, because it will always cause a crash if this code is executed, but our current situation involves porting a project between repositories piecemeal and these errors are occurring in what's temporarily dead code. It would be nice to have this be an explicit rule that could be disabled or set to a warn severity.

TwitchBronBron commented 1 year ago

You can ignore that rule on a per-line basis by adding `bs:disable-next-line above the lines in question. Would that help your issue temporarily?

lint-disable