Skip to content

Commit ad888f0

Browse files
Initial commit
0 parents  commit ad888f0

25 files changed

Lines changed: 780 additions & 0 deletions

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "21:00"
8+
open-pull-requests-limit: 10
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
name: "CodeQL"
7+
8+
on:
9+
push:
10+
branches: [master]
11+
pull_request:
12+
# The branches below must be a subset of the branches above
13+
branches: [master]
14+
schedule:
15+
- cron: '0 23 * * 1'
16+
17+
jobs:
18+
analyze:
19+
name: Analyze
20+
runs-on: ubuntu-latest
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
# Override automatic language detection by changing the below list
26+
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
27+
language: ['go']
28+
# Learn more...
29+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v2
34+
with:
35+
# We must fetch at least the immediate parents so that if this is
36+
# a pull request then we can checkout the head.
37+
fetch-depth: 2
38+
39+
# If this run was triggered by a pull request event, then checkout
40+
# the head of the pull request instead of the merge commit.
41+
- run: git checkout HEAD^2
42+
if: ${{ github.event_name == 'pull_request' }}
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on: [push, pull_request]
2+
name: Test
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.17.x, 1.18.x]
8+
os: [ubuntu-latest, macos-latest]
9+
runs-on: ${{ matrix.os }}
10+
steps:
11+
- name: Install Go
12+
uses: actions/setup-go@v2
13+
with:
14+
go-version: ${{ matrix.go-version }}
15+
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Install dependencies
20+
run: |
21+
go mod download
22+
23+
- name: Install goveralls
24+
env:
25+
GO111MODULE: off
26+
run: go get github.com/mattn/goveralls
27+
28+
- name: Test
29+
run: go test -v -coverprofile=profile.cov
30+
31+
- name: Send coverage
32+
env:
33+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: goveralls -coverprofile=profile.cov -service=github

.github/workflows/reviewdog.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: reviewdog
2+
on: [pull_request]
3+
4+
jobs:
5+
golangci-lint:
6+
name: golangci-lint
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check out code into the Go module directory
10+
uses: actions/checkout@v2
11+
- name: golangci-lint
12+
uses: reviewdog/action-golangci-lint@v1
13+
with:
14+
github_token: ${{ secrets.github_token }}
15+
level: warning
16+
17+
misspell:
18+
name: misspell
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out code into the Go module directory
22+
uses: actions/checkout@v2
23+
- name: misspell
24+
uses: reviewdog/action-misspell@v1
25+
with:
26+
github_token: ${{ secrets.github_token }}
27+
level: warning
28+
locale: "US"

.golangci.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
linters:
2+
enable:
3+
- asciicheck
4+
- bidichk
5+
- bodyclose
6+
- contextcheck
7+
- cyclop
8+
- deadcode
9+
- depguard
10+
- dogsled
11+
- dupl
12+
- durationcheck
13+
- errcheck
14+
- errname
15+
- errorlint
16+
- exhaustive
17+
- exhaustivestruct
18+
- exportloopref
19+
- forbidigo
20+
- forcetypeassert
21+
- funlen
22+
- gci
23+
- gochecknoglobals
24+
- gochecknoinits
25+
- gocognit
26+
- goconst
27+
- gocritic
28+
- gocyclo
29+
- godot
30+
- godox
31+
- gofmt
32+
- gofumpt
33+
- goheader
34+
- goimports
35+
- gomnd
36+
- gomoddirectives
37+
- gomodguard
38+
- goprintffuncname
39+
- gosec
40+
- gosimple
41+
- govet
42+
- ifshort
43+
- importas
44+
- ineffassign
45+
- interfacer
46+
- makezero
47+
- misspell
48+
- nakedret
49+
- nestif
50+
- nilerr
51+
- nilnil
52+
- nlreturn
53+
- noctx
54+
- paralleltest
55+
- prealloc
56+
- predeclared
57+
- promlinter
58+
- revive
59+
- rowserrcheck
60+
- sqlclosecheck
61+
- staticcheck
62+
- structcheck
63+
- stylecheck
64+
- tagliatelle
65+
- tenv
66+
- testpackage
67+
- thelper
68+
- tparallel
69+
- typecheck
70+
- unconvert
71+
- unparam
72+
- unused
73+
- varcheck
74+
- varnamelen
75+
- wastedassign
76+
- whitespace
77+
- wrapcheck
78+
- wsl
79+
80+
disable:
81+
# - interfacer
82+
- golint
83+
- scopelint
84+
- maligned
85+
- lll
86+
- nolintlint
87+
- ireturn
88+
- goerr113
89+
90+
presets:
91+
- bugs
92+
- comment
93+
- complexity
94+
- error
95+
- format
96+
- import
97+
- metalinter
98+
- module
99+
- performance
100+
- sql
101+
- style
102+
- test
103+
- unused
104+
105+
106+
linters-settings:
107+
check-shadowing: true
108+
enable-all: true
109+
govet:
110+
enable:
111+
- fieldalignment
112+
113+
issues:
114+
exclude-use-default: false
115+
116+
run:
117+
go: 1.17
118+

.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/misc.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/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/sql-named-parameters.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.

0 commit comments

Comments
 (0)