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