Skip to content

Commit

Permalink
YAML/JSON field name typo: "reuired" -> "required" (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelhuefner authored Feb 13, 2024
1 parent 0fc9760 commit 2d9834d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion formatters/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type Check struct {
Id string `json:"id" yaml:"id"`
Level string `json:"level" yaml:"level"`
Description string `json:"description" yaml:"description"`
Required bool `json:"reuired" yaml:"reuired"`
Required bool `json:"required" yaml:"required"`
}

type Checks []Check
Expand Down
2 changes: 1 addition & 1 deletion formatters/format_json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestJsonFormatter_RenderChecks(t *testing.T) {

out, err := jsonFormatter.RenderChecks(checks, formatters.NewRenderOpts())
require.NoError(t, err)
require.Equal(t, "[{\"id\":\"change_id\",\"level\":\"info\",\"description\":\"This is a breaking change.\",\"reuired\":true}]", string(out))
require.Equal(t, "[{\"id\":\"change_id\",\"level\":\"info\",\"description\":\"This is a breaking change.\",\"required\":true}]", string(out))
}

func TestJsonFormatter_RenderDiff(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion formatters/format_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func TestYamlFormatter_RenderChecks(t *testing.T) {

out, err := yamlFormatter.RenderChecks(checks, formatters.NewRenderOpts())
require.NoError(t, err)
require.Equal(t, "- id: change_id\n level: info\n description: This is a breaking change.\n reuired: true\n", string(out))
require.Equal(t, "- id: change_id\n level: info\n description: This is a breaking change.\n required: true\n", string(out))
}

func TestYamlFormatter_RenderDiff(t *testing.T) {
Expand Down

0 comments on commit 2d9834d

Please sign in to comment.