Skip to content

Commit 22841b2

Browse files
authored
Merge pull request #32 from PraneshASP/fix/btt-remove-name-check
⚒️ Remove name check for the Tree files
2 parents 242358c + eb9ad1a commit 22841b2

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/commands/parse-tree.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@ const treeFilesCodeActionProvider = vscode.languages.registerCodeActionsProvider
1010

1111
document.getText().split('\n').forEach((lineText, lineNumber) => {
1212
lineText = lineText.trim();
13-
if (lineNumber == 0 && !lineText.endsWith('.t.sol')) {
14-
const diagnostic = new vscode.Diagnostic(
15-
new vscode.Range(0, 0, 0, lineText.length),
16-
`Should be a valid test name (ending with .t.sol)`,
17-
vscode.DiagnosticSeverity.Error
18-
);
19-
20-
diagnostics.push(diagnostic);
21-
}
2213
if (/^(||)/.test(lineText)) {
2314
const allowedPrefixes = ['it', 'when', 'given'];
2415
lineText = lineText.replace(/^[^a-zA-Z0-9]+/, '');

src/syntaxes/tree-syntax.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"include": "#tree-characters"
1010
},
1111
{
12-
"match": "\\b[a-zA-Z0-9_.-]+\\.t\\.sol\\b",
12+
"match": "\\b[a-zA-Z0-9_.-]*?(Test[a-zA-Z0-9_.-]*|\\.t\\.sol)\\b",
1313
"name": "constant.filename"
1414
},
1515
{

0 commit comments

Comments
 (0)