SonarQube MAJOR CODE_SMELL: Define and throw a dedicated exception instead of using a generic one. #906
Labels
No labels
automated
code-quality
component: admin dashboard
component: backend
component: billing
component: content management
component: faqs
component: game genres
component: game lists
component: game reviews
component: game search
component: games
component: internal notifications
component: platforms
component: security
component: tests
component: user api
component: user badges
component: user blogs
component: user consoles
component: user favorites
component: user friends
component: user notifications
component: user profiles
component: user site notifications
component: user wishlists
component: web design
dependencies
javascript
php
priority
high
priority
low
priority
medium
security-hotspot
source: codex
source: sonarqube
status
awaiting feedback
status
backlog
status
done
status
in progress
status
in queue
status
in review
status
needs codex review
status
needs investigation
status
wontfix
type: bug
type: documentation
type: feature
type: improvement
type: regression
type: task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MyVideoGameList/myvideogamelist.com#906
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SonarQube issue detected.
SonarQube key:
981bffa8-90e8-4541-8c2f-22a8bd936faaSeverity:
MAJORType:
CODE_SMELLLocation:
myvideogamelist:app/Console/Commands/SyncProductionSnapshot.php:218Message: Define and throw a dedicated exception instead of using a generic one.
https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=981bffa8-90e8-4541-8c2f-22a8bd936faa&open=981bffa8-90e8-4541-8c2f-22a8bd936faa
Resolved by PR #914.
Notes for future readers:
ContentFlagTargetResolver::isHidden()$typeparameter was removed because the method resolves hidden state from the model class and id.ProductionSyncCommandException, using it for command/preflight/process failures, and splitting the production data/snapshot command flow into smaller helpers to reduce return count and cognitive complexity.mvgl:sync-production-snapshotcommand remains retired perdocs/DEV_PRODUCTION_PARITY.md; the cleanup preserves its existing dry-run/write/rollback behavior while satisfying the analyzer.Verification from the PR:
php artisan test --compact tests/Feature/ContentFlagTest.php tests/Feature/ProductionDataSyncCommandTest.php tests/Feature/ProductionSnapshotCommandTest.phpvendor/bin/pint --dirty --format agentcomposer stan