-
Notifications
You must be signed in to change notification settings - Fork 930
perf(rules): optimize header-trim #4363
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
Merged
escapedcat
merged 3 commits into
conventional-changelog:master
from
felipecrs:optimize-header-trim
Apr 10, 2025
Merged
perf(rules): optimize header-trim #4363
escapedcat
merged 3 commits into
conventional-changelog:master
from
felipecrs:optimize-header-trim
Apr 10, 2025
Conversation
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
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Can you run |
@escapedcat, done, thank you! |
project-mirrors-bot-tu bot
pushed a commit
to project-mirrors/gitea-helm-chart
that referenced
this pull request
May 10, 2025
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [alpine/helm](https://github.com/alpine-docker/helm) ([changelog](https://github.com/helm/helm)) | | patch | `3.17.2` -> `3.17.3` | | [alpine/helm](https://github.com/alpine-docker/helm) ([changelog](https://github.com/helm/helm)) | container | patch | `3.17.2` -> `3.17.3` | | [commitlint/commitlint](https://github.com/conventional-changelog/commitlint) | container | patch | `19.8.0` -> `19.8.1` | | [docker.io/thegeeklab/git-sv](https://github.com/thegeeklab/git-sv) | container | patch | `2.0.0` -> `2.0.1` | --- ### Release Notes <details> <summary>conventional-changelog/commitlint (commitlint/commitlint)</summary> ### [`v19.8.1`](https://github.com/conventional-changelog/commitlint/blob/HEAD/CHANGELOG.md#1981-2025-05-08) [Compare Source](conventional-changelog/commitlint@v19.8.0...v19.8.1) ##### Bug Fixes - update dependency tinyexec to v1 ([#​4332](conventional-changelog/commitlint#4332)) ([e49449f](conventional-changelog/commitlint@e49449f)) - update dependency tinyexec to v1.0.1 ([#​4347](conventional-changelog/commitlint#4347)) ([c1b26d1](conventional-changelog/commitlint@c1b26d1)) ##### Performance Improvements - **rules:** optimize header-trim ([#​4363](conventional-changelog/commitlint#4363)) ([b7e404b](conventional-changelog/commitlint@b7e404b)) </details> <details> <summary>thegeeklab/git-sv (docker.io/thegeeklab/git-sv)</summary> ### [`v2.0.1`](https://github.com/thegeeklab/git-sv/releases/tag/v2.0.1) [Compare Source](thegeeklab/git-sv@v2.0.0...v2.0.1) #### v2.0.1 (2025-05-09) ##### Bug Fixes - **deps:** update module dario.cat/mergo to v1.0.2 ([#​195](thegeeklab/git-sv#195)) ([`3cac8ab`](thegeeklab/git-sv@3cac8ab)) - **deps:** update module github.com/urfave/cli/v3 to v3.3.2 ([#​194](thegeeklab/git-sv#194)) ([`6278830`](thegeeklab/git-sv@6278830)) ##### Others - **deps:** update dependency golangci/golangci-lint to v2.1.6 ([#​193](thegeeklab/git-sv#193)) ([`d63bf99`](thegeeklab/git-sv@d63bf99)) ##### CI Pipeline - use github token for link check ([`780f384`](thegeeklab/git-sv@780f384)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC44LjEiLCJ1cGRhdGVkSW5WZXIiOiI0MC44LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImtpbmQvZGVwZW5kZW5jeSJdfQ==--> Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/862 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
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.
Description
Optimizes header-trim rule to perform better. Comparing a string to another string is an unnecessary cost in this case.
I also replaced the
switch/case
with plainif
s, which are simpler.Motivation and Context
I just happened to see the code, and noticed it could be improved.
Usage examples
N/A
How Has This Been Tested?
Existing tests pass.
Types of changes
Checklist: