-
Notifications
You must be signed in to change notification settings - Fork 148
Improve IDE settings prompt formatting and default to yes #4705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: antonnek/auto-session-names
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package gorules | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Agent Swarm Review] [Nit] This new gorule and the testserver timestamp changes are unrelated to the IDE settings prompt improvements. Consider splitting into a separate PR for cleaner review.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems indeed unrelated. The output changes are good though |
||
|
|
||
| import "github.com/quasilyte/go-ruleguard/dsl" | ||
|
|
||
| // NoTimeNowUnixMilliInTestServer forbids direct time.Now().UnixMilli() calls in libs/testserver. | ||
| // Use nowMilli() instead to guarantee unique, strictly increasing timestamps. | ||
| // Integer millisecond timestamps get indexed replacements in test output (e.g. [UNIX_TIME_MILLIS][0]) | ||
| // and collisions between resources cause flaky tests. | ||
| func NoTimeNowUnixMilliInTestServer(m dsl.Matcher) { | ||
| m.Match(`time.Now().UnixMilli()`). | ||
| Where(m.File().PkgPath.Matches(`.*/libs/testserver`) && | ||
| !m.File().Name.Matches(`fake_workspace\.go$`)). | ||
| Report(`Use nowMilli() instead of time.Now().UnixMilli() in testserver to ensure unique timestamps`) | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Agent Swarm Review] [Nit]
The change from
cmdio.AskYesOrNotocmdio.Askwith manual[Y/n]handling means only exact "y" matches are accepted.strings.EqualFold(strings.TrimSpace(ans), "y")or also accepting "yes" would be more robust.