Skip to content

Commit dd9757c

Browse files
authored
Merge pull request #10 from deslaughter/master
Update Linter for Windows
2 parents c5169e9 + 3817c88 commit dd9757c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/features/linter-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default class FortranLintingProvider {
1919
private doModernFortranLint(textDocument: vscode.TextDocument) {
2020

2121

22-
const errorRegex: RegExp = /^([A-Z]:\\)*([^:]*):([0-9]+):([0-9]+):\n+(.*)\n.*\n(Error|Warning|Fatal Error):\s(.*)$/gm;
22+
const errorRegex: RegExp = /^([a-zA-Z]:\\)*([^:]*):([0-9]+):([0-9]+):\s+(.*)\s+.*?\s+(Error|Warning|Fatal Error):\s(.*)$/gm;
2323

2424
if (textDocument.languageId !== LANGUAGE_ID) {
2525
return;

src/lib/helper.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export const _loadDocString = (keyword: string) => {
8282
}
8383

8484
export const getIncludeParams = (paths: string[]) => {
85+
if (paths.length == 0) {
86+
return ""
87+
}
8588
return "-I " + paths.join(" ");
8689
};
8790

syntaxes/fortran.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
<key>comment</key>
193193
<string>statements controling the flow of the program</string>
194194
<key>match</key>
195-
<string>\b(?i:(go\s*to|assign|to|if|then|else|elseif|end\s*if|continue|stop|pause|do|end\s*do|while|cycle))\b</string>
195+
<string>\b(?i:(go\s*to|assign|to|if|then|else|elseif|end\s*if|continue|stop|pause|do|end\s*do|while|cycle|exit))\b</string>
196196
<key>name</key>
197197
<string>keyword.control.fortran</string>
198198
</dict>

0 commit comments

Comments
 (0)