Skip to content

Commit b48b264

Browse files
authored
Merge pull request #1069 from fortran-lang/ci/xvfb
ci: swap deprecated xvfb Action
2 parents a88e3a9 + 8855a26 commit b48b264

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,10 @@ jobs:
3232
- name: Test Syntax Highlighting
3333
run: npm run test:grammar
3434
- name: Test Unittests
35-
uses: GabrielBB/xvfb-action@v1
36-
with:
37-
run: npm run test
35+
run: xvfb-run --auto-servernum npm run test
3836
# This will not fail the job if tests fail so we have to npm test separately
3937
- name: Coverage report
40-
uses: GabrielBB/xvfb-action@v1
41-
with:
42-
run: npm run coverage
38+
run: xvfb-run --auto-servernum npm run coverage
4339
- name: Upload coverage to Codecov
4440
uses: codecov/codecov-action@v3
4541
with:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
},
252252
"fortran.linter.initialize": {
253253
"type": "boolean",
254-
"default": true,
254+
"default": false,
255255
"markdownDescription": "Attempt to initialize the linter by mock-compiling all files in the workspace.",
256256
"order": 5
257257
},

src/lint/provider.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,15 @@ export class FortranLintingProvider {
341341
// Discard the previous diagnostic state for this document
342342
if (this.fortranDiagnostics.has(document.uri)) this.fortranDiagnostics.delete(document.uri);
343343
this.logger.debug('[lint] No linting diagnostics to show');
344+
console.log('[lint] No linting diagnostics to show');
344345
return;
345346
}
346347
let diagnostics: vscode.Diagnostic[] = this.linter.parse(output);
348+
console.log('[lint] Parsing output to vscode.Diagnostics', diagnostics);
347349
this.logger.debug('[lint] Parsing output to vscode.Diagnostics', diagnostics);
348350
// Remove duplicates from the diagnostics array
349351
diagnostics = [...new Map(diagnostics.map(v => [JSON.stringify(v), v])).values()];
352+
console.log('[lint] Removing duplicates. vscode.Diagnostics are now:', diagnostics);
350353
this.logger.debug('[lint] Removing duplicates. vscode.Diagnostics are now:', diagnostics);
351354
this.fortranDiagnostics.set(document.uri, diagnostics);
352355
return diagnostics;
@@ -377,6 +380,8 @@ export class FortranLintingProvider {
377380
`[build.single] compiler: "${this.settings.compiler}" located in: "${command}"`
378381
);
379382
this.logger.info(`[build.single] Compiler query command line: ${command} ${argList.join(' ')}`);
383+
console.log(`[build.single] compiler: "${this.settings.compiler}" located in: "${command}"`);
384+
console.log(`[build.single] Compiler query command line: ${command} ${argList.join(' ')}`);
380385

381386
try {
382387
const fypp = await this.getFyppProcess(document);
@@ -392,6 +397,7 @@ export class FortranLintingProvider {
392397
);
393398
const output: string = stdout + stderr;
394399
this.logger.debug(`[build.single] Compiler output:\n${output}`);
400+
console.log(`[build.single] Compiler output:\n${output}`);
395401
return output;
396402
} catch (err) {
397403
this.logger.error(`[build.single] Compiler error:`, err);

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"resolveJsonModule": true,
99
"esModuleInterop": true,
1010
"removeComments": true,
11-
"rootDir": ".",
11+
"rootDir": "."
1212
},
1313
"include": ["src/**/*.ts", "src/**/*.json"],
14-
"exclude": ["node_modules", ".vscode-test", "assets/videos"],
14+
"exclude": ["node_modules", ".vscode-test", "assets/videos"]
1515
}

0 commit comments

Comments
 (0)