rokucommunity / bslint

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

Code flow doesn't properly handle conditional compile #127

Open TwitchBronBron opened 1 month ago

TwitchBronBron commented 1 month ago

image

it.only('tracks code flow between conditional compile blocks', () => {
    program.setFile('source/main.brs', `
        sub main()
            #if true
                text1 = "a"
            #else
                text1 = "b"
            #end if
            print text1
        end sub
    `);
    program.validate();

    expect(program.getDiagnostics()).to.eql([]);
});