We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31595a9 commit c6e364dCopy full SHA for c6e364d
main_test.go
@@ -24,16 +24,16 @@ func TestLintJSON_Valid(t *testing.T) {
24
25
func TestLintJSON_Invalid(t *testing.T) {
26
input := `{
27
- "name": "ChatGPT",
28
- "skills": ["Go", "Python"
29
- }` // Missing closing bracket
+"name": "ChatGPT",
+"skills": ["Go", "Python"
+}` // 4 real lines due to raw string literal
30
31
var output bytes.Buffer
32
err := LintJSON(strings.NewReader(input), &output)
33
if err == nil {
34
t.Error("Expected error for malformed JSON, got nil")
35
} else if !strings.Contains(err.Error(), "line 4") {
36
- t.Errorf("Expected error to mention line number, got: %v", err)
+ t.Errorf("Expected error to mention line 4, got: %v", err)
37
}
38
39
0 commit comments