• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rokucommunity / brighterscript / #15903

11 May 2026 06:41PM UTC coverage: 86.896% (-2.2%) from 89.094%
#15903

push

web-flow
Merge 70dfd6181 into ce68f5cb7

15597 of 18958 branches covered (82.27%)

Branch coverage included in aggregate %.

9 of 9 new or added lines in 3 files covered. (100.0%)

955 existing lines in 53 files now uncovered.

16351 of 17808 relevant lines covered (91.82%)

27326.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.45
/src/bscPlugin/BscPlugin.ts
1
import { isBrsFile, isXmlFile } from '../astUtils/reflection';
1✔
2
import type { Plugin, ValidateFileEvent, ProvideCodeActionsEvent, ProvideHoverEvent, ProvideSemanticTokensEvent, ValidateScopeEvent, ProvideCompletionsEvent, ProvideDefinitionEvent, ProvideReferencesEvent, ProvideDocumentSymbolsEvent, ProvideWorkspaceSymbolsEvent, AfterProvideFileEvent, AfterValidateFileEvent, AfterValidateProgramEvent, AfterSerializeFileEvent, BeforeBuildProgramEvent, OnPrepareFileEvent, WriteFileEvent, OnGetSourceFixAllCodeActionsEvent, ProvideSelectionRangesEvent } from '../interfaces';
3
import { CodeActionsProcessor } from './codeActions/CodeActionsProcessor';
1✔
4
import { FixAllCodeActionsProcessor } from './codeActions/FixAllCodeActionsProcessor';
1✔
5
import { CompletionsProcessor } from './completions/CompletionsProcessor';
1✔
6
import { DefinitionProvider } from './definition/DefinitionProvider';
1✔
7
import { DocumentSymbolProcessor } from './symbols/DocumentSymbolProcessor';
1✔
8
import { HoverProcessor } from './hover/HoverProcessor';
1✔
9
import { ReferencesProvider } from './references/ReferencesProvider';
1✔
10
import { BrsFileSemanticTokensProcessor } from './semanticTokens/BrsFileSemanticTokensProcessor';
1✔
11
import { BrsFileValidator } from './validation/BrsFileValidator';
1✔
12
import { ProgramValidator } from './validation/ProgramValidator';
1✔
13
import { ScopeValidator } from './validation/ScopeValidator';
1✔
14
import { XmlFileValidator } from './validation/XmlFileValidator';
1✔
15
import { WorkspaceSymbolProcessor } from './symbols/WorkspaceSymbolProcessor';
1✔
16
import type { BrsFile } from '../files/BrsFile';
17
import type { XmlFile } from '../files/XmlFile';
18
import { FileWriter } from './FileWriter';
1✔
19
import { FileProvider } from './fileProviders/FileProvider';
1✔
20
import { BslibManager } from './serialize/BslibManager';
1✔
21
import { FileSerializer } from './serialize/FileSerializer';
1✔
22
import { BrsFilePreTranspileProcessor } from './transpile/BrsFileTranspileProcessor';
1✔
23
import { XmlFilePreTranspileProcessor } from './transpile/XmlFilePreTranspileProcessor';
1✔
24
import { BrsFileAfterValidator } from './validation/BrsFileAfterValidator';
1✔
25
import { SelectionRangesProcessor } from './selectionRanges/SelectionRangesProcessor';
1✔
26

27
export class BscPlugin implements Plugin {
1✔
28
    public name = 'BscPlugin';
2,506✔
29

30
    public afterProvideFile(event: AfterProvideFileEvent) {
31
        new FileProvider(event).process();
3,317✔
32
    }
33

34
    public provideCodeActions(event: ProvideCodeActionsEvent) {
35
        new CodeActionsProcessor(event).process();
52✔
36
    }
37

38
    public onGetSourceFixAllCodeActions(event: OnGetSourceFixAllCodeActionsEvent) {
UNCOV
39
        new FixAllCodeActionsProcessor(event).process();
×
40
    }
41

42
    public provideHover(event: ProvideHoverEvent) {
43
        return new HoverProcessor(event).process();
97✔
44
    }
45

46
    public provideDocumentSymbols(event: ProvideDocumentSymbolsEvent) {
47
        return new DocumentSymbolProcessor(event).process();
24✔
48
    }
49

50
    public provideWorkspaceSymbols(event: ProvideWorkspaceSymbolsEvent) {
51
        return new WorkspaceSymbolProcessor(event).process();
22✔
52
    }
53

54
    public provideCompletions(event: ProvideCompletionsEvent) {
55
        new CompletionsProcessor(event).process();
131✔
56
    }
57

58
    public provideDefinition(event: ProvideDefinitionEvent) {
59
        new DefinitionProvider(event).process();
24✔
60
    }
61

62
    public provideReferences(event: ProvideReferencesEvent) {
63
        new ReferencesProvider(event).process();
4✔
64
    }
65

66
    public provideSelectionRanges(event: ProvideSelectionRangesEvent) {
67
        new SelectionRangesProcessor(event).process();
14✔
68
    }
69

70
    public provideSemanticTokens(event: ProvideSemanticTokensEvent) {
71
        if (isBrsFile(event.file)) {
26!
72
            return new BrsFileSemanticTokensProcessor(event as any).process();
26✔
73
        }
74
    }
75

76
    public validateFile(event: ValidateFileEvent) {
77
        if (isBrsFile(event.file)) {
2,868✔
78
            return new BrsFileValidator(event as ValidateFileEvent<BrsFile>).process();
2,394✔
79
        } else if (isXmlFile(event.file)) {
474!
80
            return new XmlFileValidator(event as ValidateFileEvent<XmlFile>).process();
474✔
81
        }
82
    }
83

84
    public afterValidateFile(event: AfterValidateFileEvent) {
85
        if (isBrsFile(event.file)) {
2,863✔
86
            return new BrsFileAfterValidator(event as AfterValidateFileEvent<BrsFile>).process();
2,389✔
87
        }
88
    }
89

90
    private scopeValidator = new ScopeValidator();
2,506✔
91

92
    public validateScope(event: ValidateScopeEvent) {
93
        this.scopeValidator.processEvent(event);
4,910✔
94
    }
95

96
    public afterValidateProgram(event: AfterValidateProgramEvent) {
97
        new ProgramValidator(event).process();
2,163✔
98
        //release memory once the validation cycle has finished
99
        this.scopeValidator.reset();
2,163✔
100
    }
101

102
    public beforeBuildProgram(event: BeforeBuildProgramEvent) {
103
        this.bslibManager.addBslibFileIfMissing(event);
451✔
104
    }
105
    private bslibManager = new BslibManager();
2,506✔
106

107
    /**
108
     * Do transpiling-related work after all plugins had a chance to operate on the files
109
     */
110
    public prepareFile(event: OnPrepareFileEvent) {
111
        if (isBrsFile(event.file)) {
915✔
112
            return new BrsFilePreTranspileProcessor(event as OnPrepareFileEvent<BrsFile>).process();
872✔
113
        } else if (isXmlFile(event.file)) {
43✔
114
            return new XmlFilePreTranspileProcessor(event as OnPrepareFileEvent<XmlFile>).process();
31✔
115
        }
116
    }
117

118
    public async afterSerializeFile(event: AfterSerializeFileEvent) {
119
        await new FileSerializer(event).process();
912✔
120
    }
121

122
    public async writeFile(event: WriteFileEvent) {
123
        await new FileWriter(event).process();
1,456✔
124
    }
125

126
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc