Skip to content

Commit 5a47eb1

Browse files
committed
chore: Move all files into op-translator
Also copy Go config files that are relevant to metabased-publisher into the metabased-publisher directory
1 parent 9acfa28 commit 5a47eb1

Some content is hidden

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

45 files changed

+218
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

op-translator/.air.toml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
root = "."
2+
testdata_dir = "testdata"
3+
tmp_dir = "tmp"
4+
5+
[build]
6+
args_bin = []
7+
bin = "./tmp/main"
8+
cmd = "go build -o ./tmp/main ."
9+
delay = 1000
10+
exclude_dir = ["assets", "tmp", "vendor", "testdata"]
11+
exclude_file = []
12+
exclude_regex = ["_test.go"]
13+
exclude_unchanged = false
14+
follow_symlink = false
15+
full_bin = ""
16+
include_dir = []
17+
include_ext = ["go", "tpl", "tmpl", "html"]
18+
kill_delay = "0s"
19+
log = "build-errors.log"
20+
send_interrupt = false
21+
stop_on_error = true
22+
23+
[color]
24+
app = ""
25+
build = "yellow"
26+
main = "magenta"
27+
runner = "green"
28+
watcher = "cyan"
29+
30+
[log]
31+
time = false
32+
33+
[misc]
34+
clean_on_exit = false
35+
36+
[screen]
37+
clear_on_rebuild = false

op-translator/.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
8+
# Test binary, built with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Dependency directories (remove the comment below to include it)
15+
# vendor/
16+
17+
# Local environment
18+
.env
19+
20+
# Build files
21+
op-translator
22+
bin/
23+
generated/
24+
openapi/
25+
26+
# Hot Reload (Air)
27+
tmp
28+
29+
# Internal files
30+
internal/.DS_Store
31+
.DS_Store
32+
.vscode

op-translator/.golangci.yaml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
linters-settings:
2+
errcheck:
3+
# Report `a := b.(MyStruct)` when `a, ok := ...` should be.
4+
check-type-assertions: true # Default: false
5+
6+
# Report skipped checks:`num, _ := strconv.Atoi(numStr)`.
7+
check-blank: false # Default: false
8+
9+
# Function to skip.
10+
exclude-functions:
11+
- io/ioutil.ReadFile
12+
- io.Copy(*bytes.Buffer)
13+
- io.Copy(os.Stdout)
14+
15+
goconst:
16+
min-len: 2
17+
min-occurrences: 3
18+
gocritic:
19+
enabled-tags:
20+
- diagnostic
21+
- experimental
22+
- opinionated
23+
- performance
24+
- style
25+
disabled-checks:
26+
# conflicts with nolintlint
27+
- whyNoLint
28+
# fast moving project so comments are fine
29+
- commentedOutCode
30+
# # These 3 will detect many cases, but they do sense
31+
# # if it's performance oriented code
32+
# - hugeParam
33+
# - rangeExprCopy
34+
# - rangeValCopy
35+
gofmt:
36+
rewrite-rules:
37+
- pattern: "interface{}"
38+
replacement: "any"
39+
goimports:
40+
local-prefixes: github.com/golangci/golangci-lint
41+
42+
govet:
43+
settings:
44+
printf:
45+
funcs:
46+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
47+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
48+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
49+
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
50+
enable-all: true
51+
nakedret:
52+
# No naked returns, ever.
53+
max-func-lines: 1 # Default: 30
54+
55+
misspell:
56+
locale: US
57+
nolintlint:
58+
allow-unused: true # should be true but GitHub Action has some issues with it
59+
require-explanation: true # require an explanation for nolint directives
60+
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
61+
revive:
62+
rules:
63+
- name: unexported-return
64+
disabled: true
65+
# fast-moving project so ignore for now
66+
- name: unused-parameter
67+
disabled: true
68+
tagliatelle:
69+
case:
70+
rules:
71+
json: camel
72+
yaml: camel
73+
xml: camel
74+
bson: camel
75+
avro: snake
76+
mapstructure: kebab
77+
78+
linters:
79+
disable-all: false
80+
enable:
81+
- asasalint
82+
- asciicheck
83+
- bidichk
84+
- bodyclose
85+
- dogsled
86+
- durationcheck
87+
- errcheck
88+
- errorlint
89+
- copyloopvar
90+
- errname
91+
- goconst
92+
- gocritic
93+
- gofmt
94+
- goimports
95+
- goprintffuncname
96+
- gosec
97+
- gosimple
98+
- govet
99+
- ineffassign
100+
- misspell
101+
- mnd
102+
- nakedret
103+
- nilerr
104+
- noctx
105+
- nolintlint
106+
- prealloc
107+
- predeclared
108+
- reassign
109+
- revive
110+
- rowserrcheck
111+
- sqlclosecheck
112+
- staticcheck
113+
- stylecheck
114+
- tagliatelle
115+
- tenv
116+
- testableexamples
117+
- thelper
118+
- tparallel
119+
- unconvert
120+
- unparam
121+
- unused
122+
- usestdlibvars
123+
- wastedassign
124+
disable:
125+
- nilnil
126+
- dupl
127+
- lll
128+
- whitespace
129+
- funlen
130+
- gochecknoinits
131+
- gochecknoglobals
132+
- typecheck
133+
- gocyclo
134+
135+
issues:
136+
# setting 0 to have all the results.
137+
max-issues-per-linter: 0
138+
max-same-issues: 0
139+
fix: false
140+
141+
run:
142+
concurrency: 8
143+
timeout: 5m
144+
issues-exit-code: 1
145+
tests: true
146+
# With the read-only mode linter will fail if the go.mod file is outdated.
147+
modules-download-mode: readonly
148+
# Keep this empty to use the Go version from the go.mod file.
149+
go: ""
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)