From 2d9834dae7582152be1d8518686a8abf45b3d982 Mon Sep 17 00:00:00 2001 From: Raphael Huefner Date: Tue, 13 Feb 2024 08:49:11 +0100 Subject: [PATCH] YAML/JSON field name typo: "reuired" -> "required" (#491) --- formatters/checks.go | 2 +- formatters/format_json_test.go | 2 +- formatters/format_yaml_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/formatters/checks.go b/formatters/checks.go index 0e73a739..2fe0b533 100644 --- a/formatters/checks.go +++ b/formatters/checks.go @@ -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 diff --git a/formatters/format_json_test.go b/formatters/format_json_test.go index cd440114..2935ab29 100644 --- a/formatters/format_json_test.go +++ b/formatters/format_json_test.go @@ -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) { diff --git a/formatters/format_yaml_test.go b/formatters/format_yaml_test.go index c1c0e6b9..e827d5d7 100644 --- a/formatters/format_yaml_test.go +++ b/formatters/format_yaml_test.go @@ -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) {