plexsystems / vscode-protolint

A protobuf linter for visual studio code
MIT License
54 stars 14 forks source link

Cannot find .protolint.yaml file in VSCode Workspace mode #13

Closed silenceisgolden closed 4 years ago

silenceisgolden commented 4 years ago

Hey all, thanks for a great extension!

I am seeing a workspace issue where the .protolint.yaml file is not being found when the extension runs on file save. My workspace looks like

folder-1
  project.code-workspace (references other folders by `../` paths)
folder-2
  folder
    folder
      thing.proto
  .protolint.yaml

When I open up the workspace and see the multiple folders in the VSCode Explorer view, the lint config is ignored. When I open up the proto folder directly, the config file is found as normal.

My guess is that the folder referenced in the protolint command is not correct or not formatted like protolint would expect:

`protolint lint -config_dir_path="${workspaceFolder.uri.fsPath}" ${currentFile}`; // src/linter.ts line 53

I am not experienced in debugging VSCode extensions so I cannot confirm if that is the issue right now.

jpreese commented 4 years ago

@silenceisgolden thanks for opening this issue, that's a strong guess. The workspaces are definitely an array and I personally only ever have one workspace open at a time, so I haven't tested much with multiple.

jpreese commented 4 years ago

@silenceisgolden

This has been released in v0.5.0 and it is available on the Marketplace. Thanks again for your contribution! ❤️