Skip to content

Commit 08b3924

Browse files
committed
feat: Remove duplicate diagnostics from linter
Fixes #598
1 parent 7bcff2c commit 08b3924

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Removes duplicate diagnostic messages from the linter
13+
([#598](https://github.com/fortran-lang/vscode-fortran-support/issues/598))
14+
1015
## [3.2.0]
1116

1217
### Added

src/features/linter-provider.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ export class FortranLintingProvider {
101101
compilerOutput += data;
102102
});
103103
childProcess.stderr.on('end', () => {
104-
const diagnostics = this.getLinterResults(compilerOutput);
104+
let diagnostics = this.getLinterResults(compilerOutput);
105+
diagnostics = [...new Map(diagnostics.map(v => [JSON.stringify(v), v])).values()];
105106
this.diagnosticCollection.set(textDocument.uri, diagnostics);
106107
});
107108
childProcess.on('error', err => {

0 commit comments

Comments
 (0)