vknabel / vscode-swiftlint

VS Code extension to enforce Swift style and conventions via SwiftLint
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swiftlint
MIT License
21 stars 0 forks source link

Linting fails over Live Share #48

Open tetraoxygen opened 2 years ago

tetraoxygen commented 2 years ago

Report Command failed: /opt/homebrew/bin/swiftlint --use-script-input-files --quiet --reporter json --formaterror opening input file '/Tests/WorkInModelTests/WorkInModelTests.swift' (No such file or directory)Most rules will be skipped because sourcekitd has failed.SourceKittenFramework/File.swift:20: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The file “WorkInModelTests.swift” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Tests/WorkInModelTests/WorkInModelTests.swift, NSUnderlyingError=0x12e0140e0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}


`Error: Command failed: /opt/homebrew/bin/swiftlint --use-script-input-files --quiet --reporter json --format
error opening input file '/Tests/WorkInModelTests/WorkInModelTests.swift' (No such file or directory)
Most rules will be skipped because sourcekitd has failed.
SourceKittenFramework/File.swift:20: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The file “WorkInModelTests.swift” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Tests/WorkInModelTests/WorkInModelTests.swift, NSUnderlyingError=0x12e0140e0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

    at ChildProcess.exithandler (node:child_process:406:12)
    at ChildProcess.emit (node:events:390:28)
    at maybeClose (node:internal/child_process:1064:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:390:28)
    at Pipe.<anonymous> (node:net:687:12)
os: darwin`
vknabel commented 2 years ago

Hi @tetraoxygen, thanks for your feedback. Did you delete Tests/WorkInModelTests/WorkInModelTests.swift?

tetraoxygen commented 2 years ago

No, though this was over Live Share.

vknabel commented 1 year ago

This issue takes a little bit more effort as SwiftLint has no direct access to the files. Configs and the FS is not available.

Probably the extension on the live share host needs to open a server which broadcasts all linting results, while the guests need to send requests to it (like „I opened file xyz“).

This might take a while.