Skip to content

JS-1597 add generated-source suppression API#7125

Open
francois-mora-sonarsource wants to merge 4 commits into
masterfrom
fix/generated-code-detection-01-suppression-api
Open

JS-1597 add generated-source suppression API#7125
francois-mora-sonarsource wants to merge 4 commits into
masterfrom
fix/generated-code-detection-01-suppression-api

Conversation

@francois-mora-sonarsource
Copy link
Copy Markdown
Contributor

@francois-mora-sonarsource francois-mora-sonarsource commented May 29, 2026

Part of JS-1597

Summary

  • add generated-source suppression metadata sourced from the RSPEC editable-source tag
  • add a linter-level generated-source predicate hook and rule filter without introducing detector/store dependencies
  • guard the generated-source predicate when detectGeneratedCode is disabled
  • replace the brittle source-string generator test with a behavior-level helper test

Testing

  • npx tsx --tsconfig packages/tsconfig.test.json --test packages/analysis/tests/jsts/linter/index.test.ts packages/analysis/tests/generate-eslint-meta-source.test.ts
  • npx prettier --check packages/analysis/src/jsts/linter/linter.ts packages/analysis/tests/jsts/linter/index.test.ts packages/analysis/tests/generate-eslint-meta-source.test.ts packages/analysis/src/jsts/rules/helpers/generated-source.ts tools/generate-eslint-meta.ts

@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod Bot commented May 29, 2026

JS-1597

@francois-mora-sonarsource francois-mora-sonarsource marked this pull request as draft May 29, 2026 11:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 2026

Ruling Report

No changes to ruling expected issues in this PR

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 29, 2026

Code Review ✅ Approved

Implements a generated-source suppression API using RSPEC metadata and adds a linter-level predicate hook. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqube-next
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant