Skip to content

refactor: remove unused Trigger.IsKnownType method - #709

Merged
mwbrooks merged 2 commits into
mainfrom
mwbrooks-remove-dead-trigger-is-known-type
Oct 19, 2026
Merged

mwbrooks merged 2 commits into
mainfrom
mwbrooks-remove-dead-trigger-is-known-type

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Changelog

N/A - internal cleanup with no user-facing changes.

Summary

This pull request removes Trigger.IsKnownType from internal/shared/types/triggers.go for maintainers, because the Go deadcode tool reports it as unreachable. Less unused code to read and keep compiling.

  • Removes Trigger.IsKnownType from internal/shared/types/triggers.go
  • Removes its unit tests in internal/shared/types/triggers_test.go, which only tested this method

Testing

  1. Run go run golang.org/x/tools/cmd/deadcode@latest ./... | grep IsKnownType and confirm there's no output
  2. Run go build ./... && go test ./... and confirm both pass

Requirements

@mwbrooks
mwbrooks requested a review from a team as a code owner October 19, 2026 17:17
@mwbrooks mwbrooks added this to the Next Release milestone Oct 19, 2026
@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 Oct 19, 2026
@mwbrooks mwbrooks self-assigned this Oct 19, 2026
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.31%. Comparing base (63989fe) to head (6dbc441).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #709      +/-   ##
==========================================
+ Coverage   78.13%   78.31%   +0.17%     
==========================================
  Files         239      238       -1     
  Lines       18125    18297     +172     
==========================================
+ Hits        14162    14329     +167     
- Misses       3963     3968       +5     

☔ View full report in Codecov by Harness.
📢 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.

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mwbrooks Thanks for keeping a search going toward less code! I like the change - ILTC?

}

// IsKnownType returns true if Trigger.Type is a known and supported type
func (t *Trigger) IsKnownType() bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🦕 question: Do you know?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🦕.isKnownType() => true

@mwbrooks
mwbrooks enabled auto-merge (squash) October 19, 2026 19:55
@mwbrooks
mwbrooks merged commit 5bfb60e into main Oct 19, 2026
13 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-remove-dead-trigger-is-known-type branch October 19, 2026 19:58
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.

2 participants