Comments (14)
I'd be happy if you are willing to support me and in the long term eventually take them over.
Supporting this extension is actually interesting to The Browser Company, where I work. I'll be in touch when I have more info!
from vscode-swiftlint.
I implemented this fix and it works on my machine: #73 . I also want to propose #72
from vscode-swiftlint.
Hi @tristanlabelle, thanks for your suggestion! As I don't have access to a windows machine, I am not able to test the current build, but I created a beta build for this extension including your fix for windows. Could you give it a try?
1.8.4-beta.0
from vscode-swiftlint.
@vknabel I'm having issues with the vsix... I wonder if my VS Code is in a bad state đ¤
I installed it from the "Install from VSIX" command here:
from vscode-swiftlint.
That's weird. You did nothing wrong. Not sure why it isn't working though.
I created a new build with bumped dependencies. Eventually this solves your issue.
1.8.4-beta.1
from vscode-swiftlint.
My bad, I had swiftlint.enable = false
in my user settings. The fix does not work, however. It's still trying to use /usr/bin/env
.
from vscode-swiftlint.
Sorry for the delay. I've taken some time off.
It seems like shell commands need to be executed differently on windows. Does this release solves your issue?
https://github.com/vknabel/vscode-swiftlint/releases/tag/1.8.4-beta.3
from vscode-swiftlint.
@vknabel I will try it out during the week (no computer access right now), but I was just thinking that a fix to this problem would be to implicitly prepend /usr/bin/env
in the code if running on unix systems and the swiftlint.path
contains no slashes (ie it is the unqualified name of an executable). Windows' CreateProcess
function will look in the %Path%
by default so that will work there too.
It make a bit more sense too because swiftlint.path
is currently more of a command line prefix than a path.
from vscode-swiftlint.
Back in time I did use a different function in the viscose extension which (in theory) would prefix everything with /usr/bin/env
. But in some cases it did not work properly and it did not respect the local PATH variables of the user unless started from the shell itself.
On windows I now use the old way with a thin layer of compatibility. I hope this helps.
But I agree swiftlint.path
is actually a prefix (an could in theory be set to swift run swiftlint
etc).
from vscode-swiftlint.
Thanks a lot for your work and enthusiasm! Sadly I am currently unable to provide the deserved time and energy to this project and the other two extensions (vscode-swiftformat and vscode-apple-swift-format).
I'd be happy if you are willing to support me and in the long term eventually take them over.
from vscode-swiftlint.
Fixes have been released
from vscode-swiftlint.
At The Browser Company, we're fixing
SwiftLint
to run on Windows and have produced builds of it. This allows us to use thevscode-swiftlint
extension almost out-of-the-box (...)
@tristanlabelle you mentioned that you have produced Windows builds of SwiftLint
. Are they available somewhere? I've tried @compnerd Windows fork but to no success (build fails because of SourceKitten)
from vscode-swiftlint.
@oskargargas realm/SwiftLint#5030 is the patch set for the Windows support for SwiftLint, and jpsim/SourceKitten#769 is the patch set for SourceKitten. There is a prebuilt binary at https://github.com/thebrowsercompany/swift-build/releases/tag/SwiftLint-DEVELOPMENT-SNAPSHOT-2023-08-12-a which is the most recent one, but if there is a need, we should be able to trigger a newer build as well.
I'd love help to get the changes for SourceKitten through :)
from vscode-swiftlint.
Thanks @compnerd for the link. Works like a charm. (+/- CPU usage, but it's probably expected on apparently 10 year old CPU...)
I'd love help to get the changes for SourceKitten through :)
I'll take a look if only time allows. Have a few more days off but also some things planned.
from vscode-swiftlint.
Related Issues (20)
- Report 1 Command failed: swiftlint lint --quiet --reporter jsonError: No lintable files found at paths: '' HOT 1
- Report Command failed: /opt/homebrew/bin/swiftlint /usr/bin/env swiftlint lint --quiet --reporter jsonwarning: Configuration contains invalid keys identation.SourceKittenFramework/File.swift:20: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=261 "The file âenvâ couldnât be opened using text encoding Unicode (UTF-8)." UserInfo={NSFilePath=/usr/bin/env, NSStringEncoding=4}PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. HOT 1
- Report Command failed: /usr/bin/env swiftlint lint --quiet --reporter jsonSourceKittenFramework/File.swift:20: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The file âSerialExecutorTests.swiftâ couldnât be opened because there is no such file." UserInfo={NSFilePath=/Users/MyUser/Development/Vapor/MyProject/.build/checkouts/swift-nio/Tests/NIOPosixTests/SerialExecutorTests.swift, NSUnderlyingError=0x13898b600 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} HOT 1
- Report Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonwarning: Found a configuration for 'type_body_length' rule, but it is disabled on 'disabled_rules'.SourceKittenFramework/File.swift:20: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The file âColor Extension.swiftâ couldnât be opened because there is no such file." UserInfo={NSFilePath=/Users/user/Development/Git/app/Color Extension.swift, NSUnderlyingError=0x7ff5c571c650 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}} HOT 1
- Report Command failed: /opt/homebrew/bin/swiftlint /usr/bin/env swiftlint lint --quiet --reporter jsonwarning: Invalid configuration for 'trailing_whitespace'. Falling back to default.warning: Invalid configuration for 'indentation'. Falling back to default.SourceKittenFramework/File.swift:20: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=261 "The file âenvâ couldnât be opened using text encoding Unicode (UTF-8)." UserInfo={NSFilePath=/usr/bin/env, NSStringEncoding=4}PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. HOT 1
- Report 1 Command failed: swiftlint lint --quiet --reporter jsonError: No lintable files found at paths: '' HOT 1
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonError: No lintable files found at paths: '' HOT 3
- add Windows support HOT 1
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonError: No lintable files found at paths: '' HOT 2
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonError: No lintable files found at paths: '' HOT 1
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonError: No lintable files found at paths: '' HOT 1
- Support `source.fixAll.swiftlint`
- onlyEnableWithConfig confusion HOT 1
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonError: No lintable files found at paths: '' HOT 1
- Report Command failed: /home//SDKs/Swift/swift-tools/SwiftLint/.build/release/swiftlint lint --quiet --reporter jsonSourceKittenFramework/library_wrapper.swift:31: Fatal error: Loading libsourcekitdInProc.so failed HOT 1
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonError: No lintable files found at paths: '' HOT 1
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter jsonError: No lintable files found at paths: '' HOT 1
- Report Aliased anchor not found: /.build HOT 1
- Report 1 Command failed: /usr/bin/env swiftlint lint --use-script-input-files --quiet --reporter json --config /Users/bvanderw/Projects/kOS-Mac/.swiftlint.ymlError: No lintable files found at paths: '' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ď¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-swiftlint.