forked from amccarthy1/go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.profanity.yml
108 lines (96 loc) · 2.59 KB
/
.profanity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#
# Copyright (c) 2021 - Present. Blend Labs, Inc. All rights reserved
# Use of this source code is governed by a MIT license that can be found in the LICENSE file.
#
GOLANG_LOGGER: #note: this does not affect go-sdk/logger because of the package selector
description: "please use `logger.Log`, not a type reference"
contents:
contains:
include:
- "*logger.Logger"
GOLANG_STRETCHR_TESTIFY:
description: "please use `golang.blend.com/sdk/assert`"
goImports:
include:
- "github.com/stretchr/testify/assert"
GOLANG_LATCH:
description: "please use the latch constructor, `async.NewLatch()`"
contents:
contains:
include:
- "async.Latch{}"
GOLANG_ASSERT_NON_TEST:
description: "do not include assert in non _test.go files"
files:
exclude:
- "*_test.go"
- "testutil/**"
goImports:
include:
- "github.com/blend/go-sdk/assert"
GOLANG_YAML:
description: "please use `gopkg.in/yaml.v3`"
goImports:
include:
- "gopkg.in/yaml.v2"
GOLANG_PRINTLN:
description: "please remove debugging `println` statements"
files:
exclude:
- "examples/*"
goCalls:
- func: "println"
- func: "print"
GOLANG_FMT_PRINT:
description: "please remove debugging `fmt.Print*` statements; if you have to use `fmt.Print*` use `fmt.Fprint*(os.Stdout`"
files:
exclude:
- "examples/*"
- "cmd/*"
- "*/_bench/*"
- "*/_fontdata/*"
goCalls:
- func: "Print"
package: "fmt"
- func: "Printf"
package: "fmt"
- func: "Println"
package: "fmt"
GOLANG_CMD_IMPORTS:
description: "please don't reference cmd packages"
goImports:
include:
- "github.com/blend/go-sdk/cmd*"
GOLANG_EXAMPLES_IMPORTS:
description: "please don't reference example packages"
files:
exclude:
- "examples/*"
goImports:
include:
- "github.com/blend/go-sdk/example*"
GOLANG_CONTEXT_SHADOWED:
description: "you should not shadow the context package"
contents:
contains:
include:
- "context context.Context"
GIT_MERGE_CONFLICTS:
description: "do not commit merge conflicted code"
contents:
contains:
include: [ "<<<<<<<", ">>>>>>>"]
SDK_BANNED_TERMS:
description: "You should refrain from using terms / references for internal services in the `sdk` repository as it is public"
contents:
contains:
include:
- "golang.blend.com"
SDK_AWS_ARNS:
description: "There shouldn't be anything that looks like an AWS arn in `sdk`"
files:
include: [ "sdk/**" ]
contents:
regex:
include:
- 'arn:(aws|aws-cn|aws-us-gov):([^:\n]*):([^:\n]*):([^:\n]*):([^:\/\n]*)[:\/]?(.*)$'