Skip to content

[BUG] When running a linter through WSL, the file where the error occurred cannot be correctly indicated #530

@yaoyao22fanfan

Description

@yaoyao22fanfan

Describe the bug
When running a linter through WSL, the file where the error occurred cannot be correctly indicated.

  1. 'NUL' at line head
    Original output from WSL:
Image

Because some 'NUL' was added to the head of some line, the errors can't be detected correctly.

          // first line would be normal stderr output like "directory name is invalid"
          // others are verilator sort of "highlighting" the issue, the block with "^~~~~"
          // this can actually be used for better error/warning highlighting

          // also this might have some false positives
          // probably something like "stderr passthrough setting" would be a good idea
          if (!line.startsWith('%')) {
            
            // allows for persistent 
            if (lastDiagMessageType === 'Warning') { this.logger.warn(line); }
              else { this.logger.error(line); }
            return;
          }
  1. The file path where an error occurred was not converted
    Obviously, the file path displayed in the "Problems" window is a shared file path belonging to WSL, not a Windows path.
    If it isn't converted to a Windows path, I can't find the error directly by click.
Image

Environment (please complete the following information):

  • OS: Windows 11 22H2
  • VS Code version 1.102.2
  • Extension version 1.16.0

I'm very sorry that my English proficiency is extremely poor. A lot of the content was translated by machine.
If I'm free, I might submit a pull request later.
I would be very grateful if these problems could be solved. :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions