Skip to content

False difference detection when using "comments"? #26

@mgzenitech

Description

@mgzenitech

Test case:

jsonlint.json:

{
  "check": true,
  "comments": true,
  "continue": true,
  "enforce-double-quotes": true,
  "no-duplicate-keys": true,
  "sort-keys": true,
  "trailing-newline": true,
  "trim-trailing-commas": true
}

test.json

{
  "a": "b" //aaaa
}

test run:

jsonlint -f jsonlint.json test.json
File: test.json
1 hunk differs
===================================================================
--- test.json.orig
+++ test.json
@@ -1,3 +1,3 @@
 {
-  "a": "b" //aaaa
+  "a": "b"
 }

I'm a missing something in config?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions