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

rokucommunity / vscode-brightscript-language / #2719

24 Aug 2022 12:51PM UTC coverage: 41.691% (+0.02%) from 41.675%
#2719

push

TwitchBronBron
2.35.0

477 of 1427 branches covered (33.43%)

Branch coverage included in aggregate %.

1126 of 2418 relevant lines covered (46.57%)

7.32 hits per line

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

37.93
/src/BrightScriptDeclaration.ts
1
import type {
2
    Position,
3
    Range,
4
    Uri
5
} from 'vscode';
6
import {
1✔
7
    Location,
8
    SymbolKind,
9
    TextDocument
10
} from 'vscode';
11
import * as vscode from 'vscode';
1✔
12

13
export class BrightScriptDeclaration {
1✔
14
    constructor(
15
        public name: string,
1✔
16
        public kind: SymbolKind,
1✔
17
        public container: BrightScriptDeclaration | undefined,
1✔
18
        public params: string[],
1✔
19
        public nameRange: Range,
1✔
20
        public bodyRange: Range,
1✔
21
        public uri?: Uri) {
1✔
22
    }
23

24
    public static fromUri(uri: Uri) {
25
        let documentName = uri.path;
×
26
        return new BrightScriptDeclaration(documentName, vscode.SymbolKind.File, undefined, [], new vscode.Range(0, 0, 0, 0), new vscode.Range(0, 0, 0, 0), uri);
×
27
    }
28

29
    readonly isGlobal = true;
1✔
30

31
    get containerName(): string | undefined {
32
        return this.container?.name;
×
33
    }
34

35
    public visible(position: Position): boolean {
36
        return true;
×
37
        // return this.container === undefined || this.container.bodyRange.contains(position);
38
    }
39

40
    public getDocumentUri(): Uri {
41
        if (this.kind === SymbolKind.File) {
×
42
            return this.uri;
×
43
        } else if (this.container) {
×
44
            return this.container.getDocumentUri();
×
45
        } else {
46
            console.log('getDocumentUri: ERROR could not find container for symbol' + this);
×
47
        }
48
    }
49

50
    public getLocation(): Location {
51
        return new Location(this.getDocumentUri(), this.nameRange);
×
52
    }
53

54
}
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

© 2025 Coveralls, Inc