Skip to content

Conversation

@mwbrooks
Copy link
Member

@mwbrooks mwbrooks commented Jun 9, 2025

Summary

This pull request enables the linter staticcheck rule QF1003: 'Convert if/else-if chain to tagged switch'.

This linter rule is for you @zimeg 😄 It requires if/else-if checks comparing the same variable against values should be replaced with a tagged switch. I'd appreciate your eyes 👀 on my refactors - tests are passing okay.

Requirements

@mwbrooks mwbrooks added this to the Next Release milestone Jun 9, 2025
@mwbrooks mwbrooks self-assigned this Jun 9, 2025
@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Jun 9, 2025
@codecov
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

Attention: Patch coverage is 57.62712% with 25 lines in your changes missing coverage. Please review.

Project coverage is 63.48%. Comparing base (cd32746) to head (b77c055).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/triggers/access.go 37.03% 17 Missing ⚠️
internal/pkg/apps/install.go 25.00% 3 Missing ⚠️
internal/prompts/trigger_permissions.go 0.00% 3 Missing ⚠️
cmd/triggers/triggers.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   63.46%   63.48%   +0.01%     
==========================================
  Files         212      212              
  Lines       22341    22344       +3     
==========================================
+ Hits        14178    14184       +6     
- Misses       7071     7078       +7     
+ Partials     1092     1082      -10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks mwbrooks marked this pull request as ready for review June 9, 2025 20:34
@mwbrooks mwbrooks requested a review from a team as a code owner June 9, 2025 20:34
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwbrooks LGTM! This is one of my favorite linter rules I think 🤓

Strange resistance to equality checks have nudged me towards switch cases for some reason and I'm so glad to know the linter agrees this time- 🧮

@mwbrooks
Copy link
Member Author

mwbrooks commented Jun 9, 2025

Thanks for the quick review @zimeg! I figured this linter rule would be speaking to your heart ❤️ haha

@mwbrooks mwbrooks merged commit 625a457 into main Jun 9, 2025
6 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-lint-qf1003 branch June 9, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants