Skip to content

drop redundant parameters from forgeApiContext test helper (qlty func…#5

Merged
vzakharchenko merged 1 commit into
mainfrom
refactor/simplify-forge-api-context-test-helper
May 17, 2026
Merged

drop redundant parameters from forgeApiContext test helper (qlty func…#5
vzakharchenko merged 1 commit into
mainfrom
refactor/simplify-forge-api-context-test-helper

Conversation

@vzakharchenko
Copy link
Copy Markdown
Member

…tion-parameters)

All three callers passed the same class-level constants (INSTALLATION_ID, CLOUD_ID, CLIENT_KEY, SITE_URL) and the same objectMapper field. Only the optional principal varies between tests, so reading those values directly inside the helper shrinks the signature from 6 parameters to 1 (the principal, nullable for the "no FIT user" case) and closes the qlty:function-parameters finding.

The helper is no longer static because it now reads the objectMapper instance field, but no caller relied on staticness.

@vzakharchenko vzakharchenko enabled auto-merge May 17, 2026 16:03
…tion-parameters)

All three callers passed the same class-level constants (INSTALLATION_ID,
CLOUD_ID, CLIENT_KEY, SITE_URL) and the same objectMapper field. Only the
optional principal varies between tests, so reading those values directly
inside the helper shrinks the signature from 6 parameters to 1 (the principal,
nullable for the "no FIT user" case) and closes the qlty:function-parameters
finding.

The helper is no longer static because it now reads the objectMapper instance
field, but no caller relied on staticness.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vzakharchenko vzakharchenko force-pushed the refactor/simplify-forge-api-context-test-helper branch from c7bfe85 to 7033b8f Compare May 17, 2026 16:04
@qltysh
Copy link
Copy Markdown

qltysh Bot commented May 17, 2026

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@sonarqubecloud
Copy link
Copy Markdown

@vzakharchenko vzakharchenko merged commit f46d7a0 into main May 17, 2026
7 checks passed
@vzakharchenko vzakharchenko deleted the refactor/simplify-forge-api-context-test-helper branch May 17, 2026 16:05
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