SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "Year Only Game" 3 times. #762
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
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#762
Loading…
Add table
Add a link
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:
1bb1a165-fe9d-4608-8480-54f8a45b227eSeverity:
CRITICALType:
CODE_SMELLLocation:
myvideogamelist:tests/Feature/MostPopularUpcomingGamesCardTest.php:183Message: Define a constant instead of duplicating this literal "Year Only Game" 3 times.
https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=1bb1a165-fe9d-4608-8480-54f8a45b227e&open=1bb1a165-fe9d-4608-8480-54f8a45b227e
Resolved in
3589b55.Changes:
UpcomingPopularGames::eligibleReleaseLabel()to use one final return value.UPCOMING_POPULAR_YEAR_ONLY_GAMEfor the repeated year-only upcoming game test fixture name.Verification:
vendor/bin/pint --format agent app/Support/UpcomingPopularGames.php tests/Feature/MostPopularUpcomingGamesCardTest.phpphp artisan test --compact tests/Feature/MostPopularUpcomingGamesCardTest.php(6 passed, 52 assertions)composer run stan(no errors)