github.com/blend/go-sdk@v1.20220411.3/profanity/testdata/rules.yml (about) 1 GOLANG_LOGGER: #note: this does not affect go-sdk/logger because of the package selector 2 description: "please use `logger.Log`, not a type reference" 3 contents: 4 contains: 5 include: 6 - "*logger.Logger" 7 8 GOLANG_STRETCHR_TESTIFY: 9 description: "please use `golang.blend.com/sdk/assert`" 10 goImports: 11 include: 12 - "github.com/stretchr/testify/assert" 13 14 GOLANG_LATCH: 15 description: "please use the latch constructor, `async.NewLatch()`" 16 contents: 17 contains: 18 include: 19 - "async.Latch{}" 20 21 GOLANG_ASSERT_NON_TEST: 22 description: "do not include assert in non _test.go files" 23 files: 24 exclude: 25 - "*_test.go" 26 goImports: 27 include: 28 - "golang.blend.com/sdk/assert" 29 30 GOLANG_DEPRECATED: 31 description: "please switch to using `golang.blend.com`" 32 goImports: 33 include: 34 - "github.com/blendlabs/*" 35 - "github.com/blend/*" 36 exclude: 37 - "github.com/blend/sentry-go" 38 39 GOLANG_YAML: 40 description: "please use `gopkg.in/yaml.v3`" 41 goImports: 42 include: 43 - "gopkg.in/yaml.v2" 44 45 GOLANG_PRINTLN: 46 description: "please remove debugging `println` statements" 47 files: 48 exclude: 49 - "examples/*" 50 goCalls: 51 - func: "println" 52 - func: "print" 53 54 GOLANG_FMT_PRINT: 55 description: "please remove debugging `fmt.Print*` statements; if you have to use `fmt.Print*` use `fmt.Fprint*(os.Stdout`" 56 files: 57 exclude: 58 - "*/examples/*" 59 - "*/cmd/*" 60 - "*/_bench/*" 61 - "*/_fontdata/*" 62 goCalls: 63 - func: "Print" 64 package: "fmt" 65 - func: "Printf" 66 package: "fmt" 67 - func: "Println" 68 package: "fmt" 69 70 GOLANG_CMD_IMPORTS: 71 description: "please don't reference cmd packages" 72 goImports: 73 include: 74 - "golang.blend.com/sdk/cmd*" 75 76 GOLANG_EXAMPLES_IMPORTS: 77 description: "please don't reference example packages" 78 files: 79 exclude: 80 - "examples/*" 81 goImports: 82 include: 83 - "golang.blend.com/sdk/example*" 84 85 GOLANG_CONTEXT_SHADOWED: 86 description: "you should not shadow the context package" 87 contents: 88 contains: 89 include: 90 - "context context.Context" 91 92 GIT_MERGE_CONFLICTS: 93 description: "do not commit merge conflicted code" 94 contents: 95 contains: 96 include: [ "<<<<<<<", ">>>>>>>"]