-
Notifications
You must be signed in to change notification settings - Fork 243
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
Remove --strict
option from LintPlugin so that it doesn't constantly crash.
#489
Conversation
…e sure that `strict` does not exist in linter plugin args.
Make sure that `strict` does not exist in linter plugin args. Removed print debugging.
Conflicts: Plugins/LintPlugin/plugin.swift
Would this cause problems for anyone who wanted to use I don't have a lot of experience with SPM plug-ins in general (and from what I've seen, the design of the overall system is a bit limited), but I'd like to better understand the problem that this is solving and ensure that we're not harming other workflows if we do this. |
The issue is that in the regular operation of the linter if it finds any issue it prints warnings. Those warnings make it exit with a non-zero and then your IDE shows a failure when the plugin finishes. Here is an example of a successful use of the current command plugin in Xcode. A simple change would be to not add I also think though that most folks on CI will just run |
If we're offering SPM plug-ins, I don't think we should necessarily assume that people would run If the issue is that Xcode renders this incorrectly, we might have other options here since the Xcode plug-in interface is different than the command-line interface. What if the implementation was updated so that Xcode's plug-in used Longer term, I wonder if we should provide a structured output format for the lint findings (something I've considered before but never had the need to implement), and the Xcode plug-in could capture and parse those and turn each finding individually into a |
OK, changing that exit to Should I close this PR and make a new one with a more accurate title when it is ready? |
Based on discussion above, closing to solve a different way. |
You could have just re-titled the PR and updated the commit messages to reflect a new state of things, but since you've already closed this one, opening a new one is fine too.
Is it really the case that Xcode only shows warnings/errors in the source editors for build plugins, not other plugins? That would be unfortunate, because linting doesn't feel like a true "build" plugin, as it's not generating any outputs. SE-0303 seems like its intent is for build plugins to contribute new files to the build, whereas SE-0332 that introduced command plugins uses linting/formatting as its use cases. I'll have to do some more investigation here. |
The
LintPlugin
command plugin has default settings that include--strict
in the arguments. This causes any lint run to exit with a 1 and report as an error.I removed the default inclusion of
--strict
and added a filter to make sure that it isn't passed in a plugin run.No tests were added because SPM Plugin targets don't currently support tests.