Skip to content

Commit

Permalink
Merge pull request #888 from k1LoW/patched-goccy-go-yaml
Browse files Browse the repository at this point in the history
Use patched goccy/go-yaml ( goccy/go-yaml#440 )
  • Loading branch information
k1LoW authored Apr 22, 2024
2 parents 8ca3977 + 367edd0 commit edaeba1
Show file tree
Hide file tree
Showing 67 changed files with 20,002 additions and 29 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ jobs:
- name: Set up Chrome
uses: browser-actions/setup-chrome@latest

- name: Run tests
run: make ci

- name: Run octocov
uses: k1LoW/octocov-action@v1
lint:
name: Lint
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@v4

- name: Run lint
uses: reviewdog/action-golangci-lint@v2
with:
Expand All @@ -45,12 +59,6 @@ jobs:
go-version-file: go.mod
repo-checkout: false
go-package: ./...

- name: Run tests
run: make ci

- name: Run octocov
uses: k1LoW/octocov-action@v1
os-test:
name: Run on each OS
strategy:
Expand Down
7 changes: 2 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ linters-settings:
- name: exported
disabled: false
issues:
# include:
# - EXC0012
# - EXC0014
exclude:
- SA3000
exclude-dirs:
- tmpmod
2 changes: 2 additions & 0 deletions .gostyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ analyzers-settings:
# medium-varname-max: 8 # max length of variable name for medium scope (default: -1)
# large-varname-max: 16 # max length of variable name for large scope (default: -1)
# very-large-varname-max: 32 # max length of variable name for very large scope (default: -1)
exclude-files:
- tmpmod/**/*.go
4 changes: 4 additions & 0 deletions .octocov.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
coverage:
if: true
exclude:
- 'github.com/k1LoW/runn/tmpmod/**/*'
codeToTestRatio:
code:
- '**/*.go'
- '!**/*_test.go'
- '!testutil/*.go'
- '!tmpmod/**/.go'
test:
- '**/*_test.go'
- 'testutil/*.go'
- '!tmpmod/**/.go'
testExecutionTime:
if: true
diff:
Expand Down
2 changes: 1 addition & 1 deletion book.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"time"

"github.com/goccy/go-json"
"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/k1LoW/duration"
"github.com/k1LoW/sshc/v4"
)
Expand Down
2 changes: 1 addition & 1 deletion eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/expr-lang/expr/parser"
"github.com/expr-lang/expr/parser/lexer"
"github.com/goccy/go-json"
"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/k1LoW/expand"
"github.com/xlab/treeprint"
)
Expand Down
10 changes: 7 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ require (
github.com/expr-lang/expr v1.16.5
github.com/fatih/color v1.16.0
github.com/gliderlabs/ssh v0.3.7
github.com/go-playground/validator/v10 v10.4.1
github.com/go-sql-driver/mysql v1.8.1
github.com/goccy/go-json v0.10.2
github.com/goccy/go-yaml v1.11.3
github.com/golang-sql/sqlexp v0.1.0
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v58 v58.0.0
Expand All @@ -46,6 +46,7 @@ require (
github.com/k1LoW/urlfilepath v0.1.0
github.com/lestrrat-go/backoff/v2 v2.0.8
github.com/lib/pq v1.10.9
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-isatty v0.0.20
github.com/minio/pkg v1.7.5
github.com/mitchellh/copystructure v1.2.0
Expand All @@ -64,6 +65,7 @@ require (
github.com/xo/dburl v0.23.0
golang.org/x/crypto v0.22.0
golang.org/x/sync v0.7.0
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.33.1-0.20240408130810-98873a205002
gopkg.in/yaml.v2 v2.4.0
Expand Down Expand Up @@ -109,9 +111,12 @@ require (
github.com/fullstorydev/grpcurl v1.8.9 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.3.2 // indirect
github.com/goccy/go-yaml v1.11.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -133,9 +138,9 @@ require (
github.com/josharian/txtarfs v0.0.0-20210615234325-77aca6df5bca // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/mattn/go-tty v0.0.5 // indirect
Expand Down Expand Up @@ -177,7 +182,6 @@ require (
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/api v0.174.0 // indirect
google.golang.org/genproto v0.0.0-20240228224816-df926f6c8641 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240314234333-6e1732d8331c // indirect
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
Expand Down Expand Up @@ -531,6 +533,7 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX
golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q=
golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
Expand Down
2 changes: 1 addition & 1 deletion http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"testing"
"time"

"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/google/go-cmp/cmp"
"github.com/k1LoW/runn/testutil"
)
Expand Down
2 changes: 1 addition & 1 deletion http_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strconv"
"strings"

"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/pb33f/libopenapi"
validator "github.com/pb33f/libopenapi-validator"
verrors "github.com/pb33f/libopenapi-validator/errors"
Expand Down
2 changes: 1 addition & 1 deletion loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/lestrrat-go/backoff/v2"
)

Expand Down
2 changes: 1 addition & 1 deletion parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/k1LoW/duration"
"google.golang.org/grpc/metadata"
)
Expand Down
2 changes: 1 addition & 1 deletion parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/grpc/metadata"
Expand Down
10 changes: 5 additions & 5 deletions runbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"strings"

"github.com/Songmu/axslogparser"
goyaml "github.com/goccy/go-yaml"
"github.com/goccy/go-yaml/ast"
"github.com/goccy/go-yaml/lexer"
"github.com/goccy/go-yaml/parser"
"github.com/goccy/go-yaml/token"
goyaml "github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml/ast"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml/lexer"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml/parser"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml/token"
"github.com/k1LoW/curlreq"
"github.com/k1LoW/expand"
"github.com/k1LoW/grpcurlreq"
Expand Down
2 changes: 1 addition & 1 deletion runbook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/goccy/go-yaml/token"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml/token"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/tenntenn/golden"
Expand Down
2 changes: 1 addition & 1 deletion runner_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/goccy/go-yaml"
"github.com/k1LoW/runn/tmpmod/github.com/goccy/go-yaml"
"github.com/pb33f/libopenapi"
"github.com/pb33f/libopenapi/datamodel"
)
Expand Down
1 change: 1 addition & 0 deletions testdata/book/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vars:
username: alice
steps:
-
desc: "`SELECT * FROM users WHERE name = 'alice'`"
db:
query: SELECT * FROM users WHERE name = '{{ vars.username }}'
-
Expand Down
31 changes: 31 additions & 0 deletions tmpmod/github.com/goccy/go-yaml/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
codecov:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

status:
project:
default:
target: 75%
threshold: 2%
patch: off
changes: no

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

comment:
layout: "header,diff"
behavior: default
require_changes: no

ignore:
- ast
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [goccy]
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**

Please provide a minimum yaml content that can be reproduced.
We are more than happy to use [Go Playground](https://go.dev/play)

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Version Variables**
- Go version: [e.g. 1.21 ]
- go-yaml's Version: [e.g. v1.11.1 ]

**Additional context**
Add any other context about the problem here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Before submitting your PR, please confirm the following.

- [ ] Describe the purpose for which you created this PR.
- [ ] Create test code that corresponds to the modification
Loading

0 comments on commit edaeba1

Please sign in to comment.