You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've hit up against another issue extending the functionality of this plugin, and have a proposal to allow generic handling of violations by callers.
Similar to this issue: Filter out non-inline violations? #125 , I want to modify/filter or send violations somewhere else. In this case, I want all the violations to be in a single Github Review comment.
Instead of adding another small extension to support this case, I'd like to propose the following:
Removing the existing select issues block from the lint_files method
Adding a parameter that prevents this plugin from commenting. Maybe dry_run or no_comment ?
This would allow an external caller of this plugin to assume complete control over the values set in the warnings and error attr_accessors
E.g.
# Run swiftlintswiftlint.lint_files(dry_run: true)swiftlint_warnings=swiftlint.warningsswiftlint_errors=swiftlint.errors# Filter warnings + errors herefiltered_warnings=swiftlint_warnings.select(&filter_warnings)filtered_errors=swiftlint_errors.select(&filter_errors)# Create GH reviewgithub.review.start#TODO: Add all the warnings + errors here.github.review.submit
Thoughts? I can work on an implementation that makes sense if this seems reasonable.
The text was updated successfully, but these errors were encountered:
select
issues block from thelint_files
methoddry_run
orno_comment
?warnings
anderror
attr_accessorsE.g.
Thoughts? I can work on an implementation that makes sense if this seems reasonable.
The text was updated successfully, but these errors were encountered: