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; };