mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 07:20:39 +00:00
91e068f1fd
* ci(linter): add renovate/v8-ignore-reason rule
Flag coverage-ignore comments ("v8 ignore") that carry no justification.
Accepted forms: "-- reason" / "--- reason" (recommended) and the legacy
colon form "v8 ignore <kind>[ <count>]: reason", which is already
widespread in the codebase (29 sites). Bare "v8 ignore stop" markers are
exempt because the justification lives on the paired "start" marker. The
"v8 ignore next <N>" count form remains allowed; this rule only requires
a justification.
Registered as "warn" instead of "error": the repo currently has 119
reason-less v8 ignore comments, too many to fix mechanically in one PR,
so existing sites are left untouched and can be fixed incrementally.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ci(linter): promote renovate/v8-ignore-reason to error
Record the empirical verdict on the contested "v8 ignore next <N>" count
semantics in the rule doc: verified against vitest 4 with
ast-v8-to-istanbul that the count is not honored - the ignore hint always
exempts exactly the next AST node regardless of N. Counts are therefore
inert and stay allowed; the rule keeps requiring only a justification.
Promoting to error so all remaining reason-less coverage-ignore comments
must be fixed; the burndown follows in subsequent commits.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RxHFNsSworLcv23xXk9Hk
* refactor: add justifications to coverage-ignore comments (batch 1)
Give every reason-less "v8 ignore" comment outside the large platform
index files a site-specific justification explaining why the exempted
branch is untestable or defensive, as now required by the
renovate/v8-ignore-reason rule.
Also guard against a nullish comment.loc in the rule itself; the
merged-in stricter tools typechecking flagged the unguarded access.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RxHFNsSworLcv23xXk9Hk
* refactor: add justifications to coverage-ignore comments (batch 2)
Cover the five large platform index files (github, bitbucket,
bitbucket-server, codecommit, gitlab) with site-specific reasons on
every "v8 ignore" comment, completing the renovate/v8-ignore-reason
burndown. Two meaningless ignore hints inside commented-out CodeCommit
mergePr code are dropped instead of annotated.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RxHFNsSworLcv23xXk9Hk
* Apply suggestions from code review
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
* Update lib/util/regex.ts
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
120 lines
3.5 KiB
TypeScript
120 lines
3.5 KiB
TypeScript
// v8 ignore file -- constant namespace list, no executable logic to cover
|
|
/* IMPORTANT:
|
|
* These namespaces below are used as part of the cacheTtlOverride feature
|
|
* It's OK to add to them (e.g. for new datasources) but we should avoid
|
|
* backwards-incompatible changes in non-major releases
|
|
*/
|
|
|
|
export const packageCacheNamespaces = [
|
|
'_test-namespace',
|
|
'changelog-bitbucket-notes@v2',
|
|
'changelog-bitbucket-release',
|
|
'changelog-bitbucket-server-notes@v2',
|
|
'changelog-bitbucket-server-release',
|
|
'changelog-forgejo-notes@v2',
|
|
'changelog-forgejo-release',
|
|
'changelog-gitea-notes@v2',
|
|
'changelog-gitea-release',
|
|
'changelog-github-notes@v2',
|
|
'changelog-github-release',
|
|
'changelog-gitlab-notes@v2',
|
|
'changelog-gitlab-release',
|
|
'datasource-artifactory',
|
|
'datasource-aws-machine-image',
|
|
'datasource-aws-rds',
|
|
'datasource-aws-eks-addon',
|
|
'datasource-azure-bicep-resource',
|
|
'datasource-azure-pipelines-tasks',
|
|
'datasource-azure-tags',
|
|
'datasource-bazel',
|
|
'datasource-bitbucket-tags',
|
|
'datasource-bitbucket-server-tags',
|
|
'datasource-bitrise',
|
|
'datasource-buildpacks-registry',
|
|
'datasource-cdnjs',
|
|
'datasource-conan',
|
|
'datasource-conda',
|
|
'datasource-cpan',
|
|
'datasource-crate-metadata',
|
|
'datasource-crate',
|
|
'datasource-deb',
|
|
'datasource-deno',
|
|
'datasource-docker-architecture',
|
|
'datasource-docker-hub-cache',
|
|
'datasource-docker-digest',
|
|
'datasource-docker-hub-tags',
|
|
'datasource-docker-imageconfig',
|
|
'datasource-docker-labels',
|
|
'datasource-docker-releases-v2',
|
|
'datasource-docker-tags',
|
|
'datasource-dotnet-version',
|
|
'datasource-elm-package',
|
|
'datasource-endoflife-date',
|
|
'datasource-galaxy-collection',
|
|
'datasource-galaxy',
|
|
'datasource-git-refs',
|
|
'datasource-git-tags',
|
|
'datasource-git',
|
|
'datasource-forgejo-releases',
|
|
'datasource-forgejo-tags',
|
|
'datasource-gitea-releases',
|
|
'datasource-gitea-tags',
|
|
'datasource-github-digest',
|
|
'datasource-github-release-attachments',
|
|
'datasource-gitlab-packages',
|
|
'datasource-gitlab-releases',
|
|
'datasource-gitlab-tags',
|
|
'datasource-glasskube-packages',
|
|
'datasource-go-direct',
|
|
'datasource-go-proxy',
|
|
'datasource-go',
|
|
'datasource-golang-version',
|
|
'datasource-gradle-version',
|
|
'datasource-helm',
|
|
'datasource-hermit',
|
|
'datasource-hex',
|
|
'datasource-hexpm-bob',
|
|
'datasource-java-version',
|
|
'datasource-jenkins-plugins',
|
|
'datasource-jsr',
|
|
'datasource-maven:cache-provider',
|
|
'datasource-maven:metadata-not-found',
|
|
'datasource-maven:pom-cache-provider',
|
|
'datasource-maven:postprocess-reject',
|
|
'datasource-nextcloud',
|
|
'datasource-node-version',
|
|
'datasource-npm:cache-provider',
|
|
'datasource-nuget-v3',
|
|
'datasource-orb',
|
|
'datasource-packagist',
|
|
'datasource-pod',
|
|
'datasource-python-version',
|
|
'datasource-repology',
|
|
'datasource-rpm',
|
|
'datasource-ruby-version',
|
|
'datasource-rubygems',
|
|
'datasource-rust-version',
|
|
'datasource-sbt-package',
|
|
'datasource-terraform-module',
|
|
'datasource-terraform-provider',
|
|
'datasource-terraform',
|
|
'datasource-typst:cache-provider',
|
|
'datasource-typst:registry-releases',
|
|
'datasource-unity3d',
|
|
'datasource-unity3d-packages',
|
|
'github-branches-datasource-v1',
|
|
'github-releases-datasource-v2',
|
|
'github-tags-datasource-v2',
|
|
'merge-confidence',
|
|
'preset',
|
|
'terraform-provider-hash',
|
|
'url-sha256',
|
|
] as const;
|
|
|
|
export type PackageCacheNamespace =
|
|
| (typeof packageCacheNamespaces)[number]
|
|
| `datasource-releases-${string}`;
|
|
|
|
export type CombinedKey =
|
|
`datasource-mem:pkg-fetch:${PackageCacheNamespace}:${string}`;
|