From c204d0a50cb3214381ed169ae7bf87db3eead5a1 Mon Sep 17 00:00:00 2001 From: "trunk-open-pr-bot[bot]" <131314627+trunk-open-pr-bot[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 22:33:38 +0000 Subject: [PATCH] Upgrade trunk to 1.22.3-beta.26 (#830) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Trunk](https://static.trunk.io/assets/trunk_action_upgrade_banner.png)](https://trunk.io) cli upgraded: 1.22.3-beta.9 → 1.22.3-beta.26 This PR was generated by the [Trunk Action]. For more info, see our [docs] or reach out on [Slack]. [Trunk Action]: https://github.com/trunk-io/trunk-action [docs]: https://docs.trunk.io [Slack]: https://slack.trunk.io/ --------- Co-authored-by: TylerJang27 <42743566+TylerJang27@users.noreply.github.com> Co-authored-by: Tyler Jang --- .trunk/trunk.yaml | 2 +- .../test_data/markdownlint_v0.33.0_basic.check.shot | 2 +- tests/types/index.ts | 2 +- tests/utils/landing_state.ts | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 54b7818cb..f697ef911 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -2,7 +2,7 @@ version: 0.1 # version used for local trunk runs and testing cli: - version: 1.22.3-beta.9 + version: 1.22.3-beta.26 shell_hooks: enforce: true diff --git a/linters/markdownlint/test_data/markdownlint_v0.33.0_basic.check.shot b/linters/markdownlint/test_data/markdownlint_v0.33.0_basic.check.shot index 2dad159fc..1e2255dc5 100644 --- a/linters/markdownlint/test_data/markdownlint_v0.33.0_basic.check.shot +++ b/linters/markdownlint/test_data/markdownlint_v0.33.0_basic.check.shot @@ -7,7 +7,7 @@ exports[`Testing linter markdownlint test basic 1`] = ` "code": "MD025", "file": "test_data/basic.in.md", "issueClass": "ISSUE_CLASS_EXISTING", - "issueUrl": "https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#MD025", + "issueUrl": "https://github.com/DavidAnson/markdownlint/blob/vx.x.x/doc/md025.md", "level": "LEVEL_LOW", "line": "3", "linter": "markdownlint", diff --git a/tests/types/index.ts b/tests/types/index.ts index d2e8c1cfe..fd4ed87c3 100644 --- a/tests/types/index.ts +++ b/tests/types/index.ts @@ -75,7 +75,7 @@ export interface FileIssue { targetPath?: string; autofixOptions?: Autofix[]; ranges?: any[]; - issueUrl: string; + issueUrl?: string; belowThreshold?: boolean; } diff --git a/tests/utils/landing_state.ts b/tests/utils/landing_state.ts index bae5606ae..4613cb2ca 100644 --- a/tests/utils/landing_state.ts +++ b/tests/utils/landing_state.ts @@ -87,10 +87,14 @@ const normalizeRange = ({ filePath: _filePath = undefined, ...rest }) => ({ ...rest, }); +const normalizeIssueUrl = (issueUrl: string) => + issueUrl.replace(/markdownlint\/blob\/v[0-9.]+\//gm, "markdownlint/blob/vx.x.x/").trim(); + const normalizeIssues = ({ message: _message, targetPath: _targetPath, file: _file, + issueUrl: _issueUrl, autofixOptions: _autofixOptions = [], ranges: _ranges, ...rest @@ -107,6 +111,9 @@ const normalizeIssues = ({ if (_autofixOptions.length > 0) { ret.autofixOptions = _autofixOptions.map(normalizeAutofix); } + if (_issueUrl) { + ret.issueUrl = normalizeIssueUrl(_issueUrl); + } return ret; };