Skip to content

fix: sonar issues - Unused function parameters#1605

Open
jcraiglo1 wants to merge 4 commits into
mainfrom
sonar/S1172-unused-params
Open

fix: sonar issues - Unused function parameters#1605
jcraiglo1 wants to merge 4 commits into
mainfrom
sonar/S1172-unused-params

Conversation

@jcraiglo1

@jcraiglo1 jcraiglo1 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

https://redhat.atlassian.net/browse/AAP-77394

One of multiple PRs addressing sonar quality gate issues. Removes unused function parameters.

Attached is a document describing the actions taken here.

sonarcloud-remediation-report.md

Assisted-by: Claude

Summary by CodeRabbit

  • Refactor
    • Clarified several method parameters by marking unused inputs with a leading underscore.
    • No functional behavior changed; access control, startup handling, and repository lookups remain the same.

Signed-off-by: Jacob Craiglow <jacobcraiglow1@gmail.com>
@jcraiglo1 jcraiglo1 requested a review from a team as a code owner June 23, 2026 17:44
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 950df992-2e51-4793-973c-de2aed9c9d56

📥 Commits

Reviewing files that changed from the base of the PR and between a4dac75 and afeb7ba.

📒 Files selected for processing (3)
  • src/aap_eda/api/serializers/mixins.py
  • src/aap_eda/services/activation/engine/kubernetes.py
  • src/aap_eda/services/project/scm.py

📝 Walkthrough

Walkthrough

Three method signatures were updated to rename unused parameters with leading underscores, without changing logic or return values.

Changes

Unused parameter signature cleanup

Layer / File(s) Summary
Rename unused parameters
src/aap_eda/api/serializers/mixins.py, src/aap_eda/services/activation/engine/kubernetes.py, src/aap_eda/services/project/scm.py
validate_shared_resource, _wait_for_pod_to_start, and rev_parse now use underscore-prefixed parameter names while keeping their existing behavior unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR’s main change: removing unused function parameters for a Sonar remediation.
Description check ✅ Passed The description includes the issue link, purpose, and high-level change, but it lacks explicit testing and impact details.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sonar/S1172-unused-params

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jcraiglo1 jcraiglo1 changed the title sonar issues: Unused function parameters fix: sonar issues: Unused function parameters Jun 23, 2026
@jcraiglo1 jcraiglo1 changed the title fix: sonar issues: Unused function parameters fix: sonar issues - Unused function parameters Jun 23, 2026
@codecov-commenter

codecov-commenter commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.48%. Comparing base (ec64547) to head (8a25bc1).

@@           Coverage Diff           @@
##             main    #1605   +/-   ##
=======================================
  Coverage   92.48%   92.48%           
=======================================
  Files         244      244           
  Lines       11248    11248           
=======================================
  Hits        10403    10403           
  Misses        845      845           
Flag Coverage Δ
unit-int-tests-3.11 92.48% <100.00%> (ø)
unit-int-tests-3.12 92.48% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/aap_eda/api/serializers/mixins.py 100.00% <100.00%> (ø)
...c/aap_eda/services/activation/engine/kubernetes.py 90.34% <100.00%> (ø)
src/aap_eda/services/project/scm.py 76.35% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

Copy link
Copy Markdown

@jcraiglo1

Copy link
Copy Markdown
Contributor Author

/run-e2e

@jcraiglo1

Copy link
Copy Markdown
Contributor Author

/run-atf-tests

@aap-pde-ci-bot

Copy link
Copy Markdown

✅ Test Results - PASSED

Summary

Metric Count
Total Tests 65
✅ Passed 49
❌ Failed 0
⚠️ Errors 0
⏭️ Skipped 16
⏱️ Duration 211.08s

Pass Rate: 75.4%

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.

3 participants