Skip to content

Commit 585dc75

Browse files
" slang: run at file location " seems not work correctly mshr-h#460 (mshr-h#462)
* Update SlangLinter.ts when atFilelocation is enable , convert path in warning to collect path * Update CHANGELOG.md * Update CHANGELOG.md * Update src/linter/SlangLinter.ts errPath => filePath Co-authored-by: retar-kamuy <[email protected]> --------- Co-authored-by: retar-kamuy <[email protected]>
1 parent c0f13d5 commit 585dc75

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66

7+
## [Unreleased]
8+
9+
### Fixed
10+
11+
- Fix Slang: when run at filelocation is disable, detecting warning. [#460](https://github.com/mshr-h/vscode-verilog-hdl-support/issues/460)
12+
713
## [1.13.1] - 2024-01-15
814

915
### Fixed

src/linter/SlangLinter.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,17 @@ export default class SlangLinter extends BaseLinter {
101101

102102
let rex = line.match(re);
103103

104-
if (!docUri.endsWith(rex[1])) {
104+
let filePath = rex[1];
105+
if (isWindows) {
106+
if (this.useWSL) {
107+
filePath = this.convertToWslPath(filePath);
108+
this.logger.info(`Rewrote filePath to ${filePath} for WSL`);
109+
} else {
110+
filePath = filePath.replace(/\\/g, '/');
111+
}
112+
}
113+
114+
if (!docUri.endsWith(filePath)) {
105115
return;
106116
}
107117

0 commit comments

Comments
 (0)