refactor: Remove redundant github.Ptr calls#4145
refactor: Remove redundant github.Ptr calls#4145alexandear wants to merge 1 commit intogoogle:masterfrom
github.Ptr calls#4145Conversation
github.Ptr calls
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4145 +/- ##
==========================================
- Coverage 93.74% 93.69% -0.05%
==========================================
Files 211 210 -1
Lines 19685 18999 -686
==========================================
- Hits 18453 17801 -652
+ Misses 1034 1012 -22
+ Partials 198 186 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| }, | ||
| }, | ||
| LastActiveOn: Ptr(lastActiveOn), | ||
| LastActiveOn: Ptr(Timestamp{time.Date(2023, 4, 26, 15, 23, 37, 0, time.UTC)}), |
There was a problem hiding this comment.
Please revert all changes to github/actions_hosted_runners_test.go as I would consider this a regression in terms of readability. Having a single lastActiveOn variable is much easier to read and understand than having to look at each argument to see if the timestamps are the same and then trying to figure out why a single value was not OK to use here.
If you have to add exceptions to your linter, then I think that is what needs to be done.
| }, | ||
| }, | ||
| LastActiveOn: Ptr(lastActiveOn), | ||
| LastActiveOn: Ptr(Timestamp{time.Date(2023, 4, 26, 15, 23, 37, 0, time.UTC)}), |
| }, | ||
| }, | ||
| LastActiveOn: Ptr(lastActiveOn), | ||
| LastActiveOn: Ptr(Timestamp{time.Date(2023, 4, 26, 15, 23, 37, 0, time.UTC)}), |
This PR adds
redundantptrlinter to detectgithub.Ptr(x)calls that can be replaced with simple&x.