-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error severity for every rule using .swiftlint.yml #5220
Comments
That's a reasonable request. In the meantime, until it's implemented, you can set the severity of every enabled rule manually to |
I have a branch that implements this - will try to put it up later today |
See #5226 |
Thanks for the quick turnaround! I just updated my project to point to the commit with this change ( But when I open Xcode and use the plugin, I'm getting a warning that says |
ok - are you sure that your plugin is picking up the right version of SwiftLint? Because I can see where that error would be thrown from, and looking at the list of keys it should accept as valid, If it wasn't, you would also see that warning when running swiftlint directly ... |
Hmmm. So that does look right, but looking back at the source, I don't see how you could be getting those errors :-( The error is only thrown from here:
where
and
and
I really think something must be going on on your side, despite what your If you search the SwiftLint package, does the string The only other thing that occurs is the usual "Resetting Package Caches" / nuke Derived Data etc. |
Hey @mildm8nnered, I searched for I also created a new package for testing this out and I'm getting the same results, the package is published here https://github.com/juanuribeo13/SwiftlintSPM in case you want to try it out. |
Thank you so much - I did try to get plugins to work for me locally a while ago to look at another issue, but I was doing something wrong somewhere. I get |
I updated the Swift tools version to 5.7.1 so you can run it in your main machine. I'm now on Xcode 15 but it was also happening earlier this week when I had Xcode 14. Thanks for all the help! |
So ... getting closer I'm on Monterey 12.6.6 (21G646), Xcode 14.2 (14C18) Initially the build failed with Adding
Fixed that. Then I get the build succeeding, but it looks like it can't find swiftlint:
I can see
Not sure how to get that working :-( |
So did a little bit more digging on this. I still can't get it to build though :-( So looking in SwiftLint's Package.swift, I can see the following:
I think the plugin is just executing that binary, and I can see the binary under When I build your SwiftLintSPM project, I can see it building SwiftLint again, but I can't actually see any new artifacts under DerivedData. If I'm right about Still don't really understand why we're compiling SwiftLint again if we are just going to use the binary. |
ok - finally worked it out - #5032 was blocking me - Xcode 14.3 and up is required to get plugins to work, and that was also why I was getting the strange recompilation behavior. So even though the correct source is being downloaded, the plugin is going to use the You could create a branch that points to a different binary and use that as a workaround I guess, until these changes make it into a release. |
Ohhh ok, thanks for looking into it! I'll keep an eye for the next release then 🙂 |
Would it be possible to have a configuration in
.swiftlint.yml
that treats all violations as errors? It'll be nice to have the option to enable what the--strict
flag does but from the.swiftlint.yml
config file. I'd like to run swiftlint on strict mode but I'm using SPM to add it into my project and I can't find a way to pass the--strict
flag to the plugin command. I'm thinking on forking the repository and updating the plugin code on my side, but that solution isn't ideal since I'd have to keep updating that fork to get updates.The text was updated successfully, but these errors were encountered: