Skip to content

Commit ddd6ff4

Browse files
authored
chore(ci): add coderabbit config (flashcatcloud#1467)
* style: gofmt -s -w . * chore(workflow): add coderabbit config * chore(ci-lint): fix lint error
1 parent 424150a commit ddd6ff4

47 files changed

Lines changed: 142 additions & 118 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# .coderabbit.yaml
2+
language: "zh-CN"
3+
early_access: false
4+
reviews:
5+
profile: "golang"
6+
request_changes_workflow: false
7+
high_level_summary: true
8+
poetry_of_the_day: false
9+
exclude:
10+
- "vendor/**"
11+
- "docs/**"
12+
- "**/*.pb.go"

config/hostname.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (c *HostInfoCache) update() {
106106
HostInfo.SetHostname(name)
107107
}
108108
ip := os.Getenv("HOSTIP")
109-
if ip == ""{
109+
if ip == "" {
110110
nip, err := GetOutboundIP()
111111
if err != nil {
112112
log.Println("E! failed to get ip:", err)

config/logs/info.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
// InfoProvider can be extended/implemented for more complex data.
1616
//
1717
// When implementing InfoProvider - be aware of the 2 ways it is used by the status page:
18+
//
1819
// 1. when a single message is returned, the statuspage will display a single line:
1920
// InfoKey(): Info()[0]
2021
//

inputs/apache/apache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,4 @@ func (ins *Instance) Gather(slist *types.SampleList) {
121121
if err != nil {
122122
ins.logger.Log("E! failed to collect metrics:", err)
123123
}
124-
}
124+
}

inputs/dmesg/dmesg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,4 @@ func parseData(data []byte) *Msg {
241241
}
242242

243243
return &msg
244-
}
244+
}

inputs/dmesg/dmesg_notlinux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//go:build !linux
22
// +build !linux
33

4-
package dmesg
4+
package dmesg

inputs/docker/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ func (c *SocketClient) NodeList(ctx context.Context, options types.NodeListOptio
9090
}
9191
func (c *SocketClient) Close() error {
9292
return c.client.Close()
93-
}
93+
}

inputs/docker/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,4 +809,4 @@ func hostnameFromID(id string) string {
809809
// }
810810

811811
// return int64(size), nil
812-
// }
812+
// }

inputs/docker/stats_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ func CalculateMemPercentUnixNoCache(limit float64, usedNoCache float64) float64
7373
return usedNoCache / limit * 100.0
7474
}
7575
return 0
76-
}
76+
}

inputs/http_response/tls.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ func getEarliestCertExpiry(state *tls.ConnectionState) time.Time {
1616
}
1717

1818
func getCertName(state *tls.ConnectionState) string {
19-
for _, cert := range state.PeerCertificates {
20-
if !cert.IsCA {
21-
return cert.Subject.CommonName
22-
}
23-
}
24-
return ""
19+
for _, cert := range state.PeerCertificates {
20+
if !cert.IsCA {
21+
return cert.Subject.CommonName
22+
}
23+
}
24+
return ""
2525
}

0 commit comments

Comments
 (0)