Skip to content

Commit 06b9969

Browse files
authored
Merge pull request #1 from luky116/init
Init
2 parents fcda132 + 531654d commit 06b9969

Some content is hidden

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

74 files changed

+6222
-0
lines changed

.golangci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
linters-settings:
2+
govet:
3+
check-shadowing: false
4+
golint:
5+
min-confidence: 0
6+
gocyclo:
7+
min-complexity: 10
8+
maligned:
9+
suggest-new: true
10+
dupl:
11+
threshold: 100
12+
goconst:
13+
min-len: 2
14+
min-occurrences: 2
15+
depguard:
16+
list-type: blacklist
17+
packages:
18+
# logging is allowed only by logutils.Log, logrus
19+
# is allowed to use only in logutils package
20+
- github.com/sirupsen/logrus
21+
misspell:
22+
locale: US
23+
lll:
24+
line-length: 140
25+
goimports:
26+
local-prefixes: github.com/golangci/golangci-lint
27+
gocritic:
28+
enabled-tags:
29+
- performance
30+
- style
31+
- experimental
32+
disabled-checks:
33+
- wrapperFunc
34+
35+
linters:
36+
disable-all: true
37+
enable:a
38+
- govet
39+
- staticcheck
40+
- ineffassign
41+
- misspell
42+
43+
run:
44+
skip-dirs:
45+
- test/testdata_etc
46+
- pkg/golinters/goanalysis/(checker|passes)
47+
48+
issues:
49+
exclude-rules:
50+
- text: "weak cryptographic primitive"
51+
linters:
52+
- gosec
53+
- linters:
54+
- staticcheck
55+
text: "SA1019:"
56+
57+
# golangci.com configuration
58+
# https://github.com/golangci/golangci/wiki/Configuration
59+
service:
60+
golangci-lint-version: 1.16.x # use the fixed version to not introduce new linters unexpectedly
61+
prepare:
62+
- echo "here I can run custom commands, but no preparation needed for this repo"
63+

.idea/.gitignore

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

.idea/git_toolbox_prj.xml

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

.idea/modules.xml

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

.idea/seata-go.iml

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

.idea/vcs.xml

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

.licenserc.yaml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
header: # `header` section is configurations for source codes license header.
19+
license:
20+
spdx-id: Apache-2.0 # the spdx id of the license, it's convenient when your license is standard SPDX license.
21+
copyright-owner: Apache Software Foundation # the copyright owner to replace the [owner] in the `spdx-id` template.
22+
content: | # `license` will be used as the content when `fix` command needs to insert a license header.
23+
Licensed to the Apache Software Foundation (ASF) under one or more
24+
contributor license agreements. See the NOTICE file distributed with
25+
this work for additional information regarding copyright ownership.
26+
The ASF licenses this file to You under the Apache License, Version 2.0
27+
(the "License"); you may not use this file except in compliance with
28+
the License. You may obtain a copy of the License at
29+
30+
http://www.apache.org/licenses/LICENSE-2.0
31+
32+
Unless required by applicable law or agreed to in writing, software
33+
distributed under the License is distributed on an "AS IS" BASIS,
34+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35+
See the License for the specific language governing permissions and
36+
limitations under the License.
37+
# `pattern` is optional regexp if all the file headers are the same as `license` or the license of `spdx-id` and `copyright-owner`.
38+
pattern: |
39+
Licensed to the Apache Software Foundation under one or more contributor
40+
license agreements. See the NOTICE file distributed with
41+
this work for additional information regarding copyright
42+
ownership. The Apache Software Foundation licenses this file to you under
43+
the Apache License, Version 2.0 \(the "License"\); you may
44+
not use this file except in compliance with the License.
45+
You may obtain a copy of the License at
46+
http://www.apache.org/licenses/LICENSE-2.0
47+
Unless required by applicable law or agreed to in writing,
48+
software distributed under the License is distributed on an
49+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
50+
KIND, either express or implied. See the License for the
51+
specific language governing permissions and limitations
52+
under the License.
53+
paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**'].
54+
- '**'
55+
56+
paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye.
57+
- 'dist'
58+
- 'licenses'
59+
- '**/*.md'
60+
- '**/testdata/**'
61+
- '**/go.mod'
62+
- '**/go.sum'
63+
- 'LICENSE'
64+
- 'NOTICE'
65+
- '**/assets/header-templates/**'
66+
- '**/assets/lcs-templates/**'
67+
- '**/assets/languages.yaml'
68+
- '**/assets/assets.gen.go'
69+
- 'docs/**.svg'
70+
- '.travis.yml'
71+
- '.gitignore'
72+
- '.gitmodules'
73+
- 'makefile'
74+
- 'justfile'
75+
- 'docker'
76+
- 'pkg/resolver/mysql/constants.go' # with two license: apache and Vitess
77+
- 'pkg/resolver/mysql/encoding.go'
78+
- 'pkg/resolver/mysql/sql_error.go'
79+
- 'pkg/resolver/mysql/type.go'
80+
- 'VERSION'
81+
- ".errcheck-exclude"
82+
- ".golangci.yml"
83+
- '.pre-commit-config.yaml'
84+
- '.github'
85+
comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.
86+
87+
# license-location-threshold specifies the index threshold where the license header can be located,
88+
# after all, a "header" cannot be TOO far from the file start.
89+
license-location-threshold: 80
90+
91+
dependency:
92+
files:
93+
- go.mod

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: http://github.com/golangci/golangci-lint
5+
rev: v1.42.1
6+
hooks:
7+
- id: golangci-lint

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.1

cmd/start.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package main
2+
3+
func main() {
4+
// start the server
5+
}

0 commit comments

Comments
 (0)