refactor(eslint): convert with_labels to with_label where applicable#3946
Merged
DonIsaac merged 1 commit intooxc-project:mainfrom Jun 27, 2024
Merged
refactor(eslint): convert with_labels to with_label where applicable#3946DonIsaac merged 1 commit intooxc-project:mainfrom
DonIsaac merged 1 commit intooxc-project:mainfrom
Conversation
Following earlier work in d6437fe prefer `with_label` over `with_labels`. Automatically converted using CoccinelleForRust.
Contributor
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
CodSpeed Performance ReportMerging #3946 will not alter performanceComparing Summary
|
DonIsaac
approved these changes
Jun 27, 2024
Merged
Boshen
added a commit
that referenced
this pull request
Jun 29, 2024
## [0.5.1] - 2024-06-29 ### Features - f64ad4b semantic: Make jsdoc building optional (turned off by default) (#3955) (Boshen) ### Bug Fixes - c26975a linter: Only show the filename for max-lines (#3966) (Boshen) - 94329e4 linter: Handle useful but empty constructors in no-useless-constructor (#3951) (DonIsaac) - 6498a08 linter: No-useless-spread fixer with multiple spread elements (#3950) (DonIsaac) - 750cb43 oxlint: Gate custom allocators by feature flag (#3945) (Luca Bruno) ### Refactor - 1cca2a8 eslint: Convert with_labels to with_label where applicable (#3946) (Jelle van der Waa) - 2705df9 linter: Improve diagnostic labeling (#3960) (DonIsaac) Co-authored-by: Boshen <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following earlier work in d6437fe prefer
with_labeloverwith_labels. Automatically converted using CoccinelleForRust.I noticed some conversions of
with_labelstowith_labelfor a single span in #3854 and in my recent pull requests. The Linux kernel uses Coccinelle to automatically converted helper functions, so I was wondering if there was something similar for Rust as Coccinelle only does C. It turns out that there is a Coccinelle for Rust, so I wrote a small Coccinelle rule to automatically convert all rules. (This PR only touches eslint, I am happy to run it for the whole rules directory, this is more a test if the project is willing to accept such massive automatic refactors).To convert this automatically build the tool, and save the snippet below as
with_labels.cocciand run:with_labels.cocci: