Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit ff58c4e

Browse files
committed
rebuilding structure and naming to preserve different golang versions
1 parent c9ff1f0 commit ff58c4e

File tree

13 files changed

+236
-58
lines changed

13 files changed

+236
-58
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.idea
1+
.idea
2+
/*/lint/.golangci.yml

.golangci.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
run:
2+
# which dirs to skip: they won't be analyzed;
3+
# can use regexp here: generated.*, regexp is applied on full path;
4+
# default value is empty list, but next dirs are always skipped independently
5+
# from this option's value:
6+
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
7+
skip-dirs:
8+
- vendor$
9+
- testdata$
10+
11+
# which files to skip: they will be analyzed, but issues from them
12+
# won't be reported. Default value is empty list, but there is
13+
# no need to include all autogenerated files, we confidently recognize
14+
# autogenerated files. If it's not please let us know.
15+
skip-files:
16+
- "^.*\\_test\\.go$"
17+
- "^.*\\_mock\\.go$"
18+
- "^.*\\.pb\\.go$"
19+
20+
linters:
21+
disable-all: true
22+
enable:
23+
- bodyclose
24+
- deadcode
25+
- depguard
26+
- dogsled
27+
- dupl
28+
- errcheck
29+
- funlen
30+
- gas
31+
#- gochecknoglobals
32+
- gochecknoinits
33+
- gocognit
34+
- goconst
35+
- gocritic
36+
- gocyclo
37+
- gofmt
38+
- goimports
39+
- golint
40+
- gomnd
41+
- goprintffuncname
42+
- gosec
43+
- gosimple
44+
- govet
45+
- ineffassign
46+
- interfacer
47+
- lll
48+
- maligned
49+
- nakedret
50+
- prealloc
51+
- rowserrcheck
52+
- scopelint
53+
- staticcheck
54+
- structcheck
55+
- stylecheck
56+
- typecheck
57+
- unconvert
58+
- unparam
59+
- unused
60+
- varcheck
61+
- whitespace
62+
- wsl
63+
64+
linters-settings:
65+
errcheck:
66+
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
67+
# default is false: such cases aren't reported by default.
68+
check-type-assertions: true
69+
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
70+
# default is false: such cases aren't reported by default.
71+
check-blank: false
72+
gocyclo:
73+
# minimal code complexity to report, 30 by default (but we recommend 10-20)
74+
min-complexity: 25
75+
maligned:
76+
# print struct with more effective memory layout or not, false by default
77+
suggest-new: true
78+
dupl:
79+
# tokens count to trigger issue, 150 by default
80+
threshold: 110
81+
gocognit:
82+
# minimal code complexity to report, 30 by default (but we recommend 10-20)
83+
min-complexity: 50
84+
lll:
85+
# max line length, lines longer will be reported. Default is 120.
86+
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
87+
line-length: 140
88+
# tab width in spaces. Default to 1.
89+
tab-width: 4
90+
wsl:
91+
# If true append is only allowed to be cuddled if appending value is
92+
# matching variables, fields or types on line above. Default is true.
93+
strict-append: true
94+
# Allow calls and assignments to be cuddled as long as the lines have any
95+
# matching variables, fields or types. Default is true.
96+
allow-assign-and-call: true
97+
# Allow multiline assignments to be cuddled. Default is true.
98+
allow-multiline-assign: true
99+
# Allow declarations (var) to be cuddled.
100+
allow-cuddle-declarations: true
101+
# Allow trailing comments in ending of blocks
102+
allow-trailing-comment: true
103+
# Force newlines in end of case at this limit (0 = never).
104+
force-case-trailing-whitespace: 0
105+
funlen:
106+
lines: 100
107+
statements: 50
108+
109+
issues:
110+
exclude:
111+
- composites
File renamed without changes.
File renamed without changes.
File renamed without changes.

1.13/build/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM golang:1.13-alpine
2+
3+
RUN apk update && apk upgrade \
4+
&& apk add --no-cache \
5+
curl \
6+
git \
7+
make \
8+
openssh-client \
9+
tzdata \
10+
&& rm -rf /var/cache/apk/* \
11+
&& rm -rf /tmp/*
12+
13+
WORKDIR /app

1.13/lint/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM golang:1.13-alpine
2+
3+
ARG GOLANGCI_VERSION
4+
5+
RUN apk update && apk upgrade \
6+
&& apk add git gcc libc-dev \
7+
&& rm -rf /var/cache/apk/* \
8+
&& rm -rf /tmp/* \
9+
&& wget -O - -q https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s ${GOLANGCI_VERSION} \
10+
&& golangci-lint --version
11+
12+
WORKDIR /app
13+
14+
COPY .golangci.yml /app
15+
16+
CMD ["golangci-lint", "run"]

1.13/test/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM golang:1.13
2+
3+
RUN apt-get update && apt-get upgrade -y \
4+
&& rm -rf /var/lib/apt/lists/*
5+
6+
WORKDIR /app

1.14/build/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM golang:1.14-alpine
2+
3+
RUN apk update && apk upgrade \
4+
&& apk add --no-cache \
5+
curl \
6+
git \
7+
make \
8+
openssh-client \
9+
tzdata \
10+
&& rm -rf /var/cache/apk/* \
11+
&& rm -rf /tmp/*
12+
13+
WORKDIR /app

1.14/lint/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM golang:1.14-alpine
2+
3+
ARG GOLANGCI_VERSION
4+
5+
RUN apk update && apk upgrade \
6+
&& apk add git gcc libc-dev \
7+
&& rm -rf /var/cache/apk/* \
8+
&& rm -rf /tmp/* \
9+
&& wget -O - -q https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s ${GOLANGCI_VERSION} \
10+
&& golangci-lint --version
11+
12+
WORKDIR /app
13+
14+
COPY .golangci.yml /app
15+
16+
CMD ["golangci-lint", "run"]

0 commit comments

Comments
 (0)