• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / cadence / 018e1aa9-b112-4b5e-a137-732317ef6b1b
72%

Build:
DEFAULT BRANCH: master
Ran 07 Mar 2024 09:11PM UTC
Jobs 1
Files 670
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Mar 2024 08:45PM UTC coverage: 63.932% (-0.03%) from 63.962%
018e1aa9-b112-4b5e-a137-732317ef6b1b

push

buildkite

web-flow
Enforce leading space on comments (#5747)

# What

Changes all comments like this:
```go
//stuff
type thing struct {
  field string //comment
}
//go:embed directives are left alone
```
To this:
```go
// stuff
type thing struct {
  field string // comment
}
//go:embed directives are left alone
```
And added a fairly basic lint check to prevent them from coming back.
The lint check is imprecise and doesn't catch comments at the ends of non-blank lines of code,
but fixing that seemed like much more work than it was worth.

And, since this will likely neutralize a `//nolint` comment that wasn't doing anything anyway,
I've removed that one comment entirely to avoid being misleading.

# How

"Starts with X but not followed by Y" is famously hard for regex, so I only tried briefly with sed / perl before giving up.
So instead I just had Goland format the entire repository, and undid anything that wasn't a Go file.

Somewhat surprisingly, all it did was add these spaces.  Which is perfect.
Oddly it missed a single obvious one, but I'm willing to forgive it for that.

# Why

IDEs often do this when formatting files, which is thrashing a bit.

gofmt (and therefore goimports) in theory doesn't actually care... but despite their
protestations about not caring about comment formatting in github issues, Go's
source-printer and therefore gofmt *does* treat some comments specially, most notably
"directives" like `go:build`: https://cs.opensource.google/go/go/+/refs/tags/go1.22.1:src/go/printer/comment.go;l=15
and anything that might be a "doc comment" may get restructured too:
```diff
diff --git cmd/server/main.go cmd/server/main.go
index 6af56db58..b857f9211 100644
--- cmd/server/main.go
+++ cmd/server/main.go
@@ -35,6 +35,14 @@ import (
 )

 // main entry point for the cadence server
+//go:build
+// did you know
+//go:link
+// that go special
+//cases:things
+// that use
+//go:embed
+// specific comment struc... (continued)

22 of 46 new or added lines in 21 files covered. (47.83%)

88 existing lines in 14 files now uncovered.

93723 of 146599 relevant lines covered (63.93%)

2378.26 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
75.81
0.0% common/pinot/responseUtility.go
1
2.48
0.0% service/worker/parentclosepolicy/workflow.go
1
57.58
0.0% tools/cli/domain.go
2
78.79
0.0% common/elasticsearch/client/v6/client_bulk.go
2
0.0
0.0% common/elasticsearch/client/v7/client_bulk.go
2
68.3
0.0% service/history/engine/engineimpl/historyEngine.go
3
0.0
0.0% common/persistence/persistence-tests/executionManagerTest.go
3
0.0
0.0% common/persistence/persistence-tests/metadataPersistenceV2Test.go
4
8.72
0.0% common/persistence/persistence-tests/persistenceTestBase.go
5
68.05
0.0% service/history/execution/context.go

Uncovered Existing Lines

Lines Coverage ∆ File
1
88.06
-0.5% common/task/weighted_round_robin_task_scheduler.go
2
73.23
-1.57% service/matching/db.go
2
80.2
-0.51% service/matching/taskListManager.go
3
71.88
0.0% common/persistence/nosql/nosqlplugin/cassandra/workflow.go
3
50.18
-0.55% common/log/tag/tags.go
4
76.09
-1.45% common/persistence/nosql/nosqlplugin/cassandra/tasks.go
4
65.5
0.0% service/frontend/wrappers/metered/metered.go
5
84.54
-1.03% common/task/fifo_task_scheduler.go
5
84.08
-0.8% service/matching/taskReader.go
5
61.95
-1.68% common/persistence/nosql/nosql_task_store.go
6
93.57
-2.14% common/persistence/statsComputer.go
12
20.93
-27.91% common/persistence/nosql/nosqlplugin/cassandra/gocql/public/client.go
17
56.65
-5.38% service/history/execution/mutable_state_task_refresher.go
19
82.02
-1.03% common/persistence/nosql/nosqlplugin/cassandra/workflow_parsing_utils.go
Jobs
ID Job ID Ran Files Coverage
1 018e1aa9-b112-4b5e-a137-732317ef6b1b.1 07 Mar 2024 09:11PM UTC 670
63.93
Source Files on build 018e1aa9-b112-4b5e-a137-732317ef6b1b
  • Tree
  • List 670
  • Changed 277
  • Source Changed 0
  • Coverage Changed 21
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 233b3ef3 on github
  • Prev Build on master (#018E1A84...)
  • Next Build on master (#018E1ACA...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc