-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Check json.Unmarshal errors * Sorry Yoda... * Fix import shadowing * Change ifElseChain to switch * Use strings.ReplaceAll instead of strings.Replace * Fix empty string test * Combine parameters with identical types * Combine else if * Use type switch instead of if else * Fix appendAssign: append result not assigned to the same slice * Add golangci-lint configuration * Fix ioutilDeprecated: ioutil.ReadFile is deprecated * Fix: stringXbytes: suggestion: !bytes.Equal(result, sample) * Enable GitHub actions CI * Update go.mod to include Go version
- Loading branch information
1 parent
2806544
commit 286a8d7
Showing
6 changed files
with
159 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(*github.com/Jeffail/gabs/v2.Container).Array | ||
(*github.com/Jeffail/gabs/v2.Container).ArrayAppend | ||
(*github.com/Jeffail/gabs/v2.Container).ArrayAppend | ||
(*github.com/Jeffail/gabs/v2.Container).ArrayConcat | ||
(*github.com/Jeffail/gabs/v2.Container).ArrayConcatP | ||
(*github.com/Jeffail/gabs/v2.Container).ArrayP | ||
(*github.com/Jeffail/gabs/v2.Container).Set | ||
(*github.com/Jeffail/gabs/v2.Container).SetIndex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Tidy | ||
run: go mod tidy && git diff-index --quiet HEAD || { >&2 echo "Stale go.{mod,sum} detected. This can be fixed with 'go mod tidy'."; exit 1; } | ||
|
||
- name: Test | ||
run: go test -count 100 ./... | ||
|
||
golangci-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: --timeout 10m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
run: | ||
timeout: 30s | ||
|
||
issues: | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude: .errcheck.txt | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
# Default linters reported by golangci-lint help linters` in v1.39.0 | ||
- gosimple | ||
- staticcheck | ||
- unused | ||
- errcheck | ||
- govet | ||
- ineffassign | ||
- typecheck | ||
# Extra linters: | ||
- wastedassign | ||
- stylecheck | ||
- gofmt | ||
- goimports | ||
- gocritic | ||
- revive | ||
- unconvert | ||
- durationcheck | ||
- depguard | ||
- gosec | ||
- bodyclose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.