Skip to content

Commit b2f62c3

Browse files
committed
generator: implement generator for builtin go types
* supported optional types are int*, uint*, float*, bytes, string, bool * fully redo configuration for golangci-lint * simple tests for encoding/decoding roundtrip Closes #TNTP-3729
1 parent 9f66f2f commit b2f62c3

Some content is hidden

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

42 files changed

+7396
-13
lines changed

.golangci.yml

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,50 @@ formatters:
88
- goimports
99

1010
linters:
11-
enable:
12-
- forbidigo
13-
- gocritic
14-
- lll
15-
- reassign
16-
- unconvert
17-
- gosec
18-
- errorlint
19-
- godot
20-
- revive
21-
- testpackage
22-
- unused
11+
default: all
12+
13+
disable:
14+
- dupl # Dupl is disabled, since we're generating a lot of boilerplate code.
15+
- cyclop # Cyclop is disabled, since cyclomatic complexities is very abstract metric,
16+
# that sometimes lead to strange linter behaviour.
17+
- wsl # WSL is disabled, since it's obsolete. Using WSL_v5.
18+
- nlreturn # nlreturn is disabled, since it's duplicated by wsl_v5.return check.
19+
- ireturn # ireturn is disabled, since it's not needed.
20+
21+
exclusions:
22+
rules:
23+
- path-except: cmd/generator/*.go
24+
linters:
25+
- forbidigo # fmt functions are not forbidden here
26+
- gochecknoglobals # global variables are not forbidden here
2327

2428
settings:
2529
godot:
2630
scope: all
2731
lll:
2832
line-length: 120
2933
tab-width: 4
34+
wsl_v5:
35+
allow-first-in-block: true
36+
allow-whole-block: false
37+
branch-max-lines: 2
38+
case-max-lines: 0
39+
default: all
40+
depguard:
41+
rules:
42+
main:
43+
files:
44+
- "$all"
45+
- "!$test"
46+
allow:
47+
- $gostd
48+
- "github.com/vmihailenco/msgpack/v5"
49+
- "golang.org/x/text"
50+
test:
51+
files:
52+
- "$test"
53+
allow:
54+
- $gostd
55+
- "github.com/stretchr/testify"
56+
- "github.com/vmihailenco/msgpack/v5"
57+
- "github.com/tarantool/go-option"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
1010

1111
### Added
1212

13+
- Implemented optional types for builtin go types int*, uint*, float*,
14+
bytes, string, bool.
15+
16+
1317
### Changed
1418

1519
### Fixed

bool_gen.go

Lines changed: 181 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)