-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
formatter: json formatter should be native #45
Labels
Comments
fixed in #527 |
const before = [{
"filePath": "[SNAPSHOT]/input.txt",
"messages": [{
"ruleId": "example",
"index": 8,
"line": 1,
"column": 8,
"range": [8, 14],
"loc": {
"start": { "line": 1, "column": 8 },
"end": { "line": 1, "column": 14 },
},
"severity": 1,
"message": "[message-id] warning found secret: SECRET",
"data": { "ID": "SECRET" },
"type": "lint",
}, {
"ruleId": "example",
"index": 8,
"line": 1,
"column": 8,
"range": [8, 14],
"loc": {
"start": { "line": 1, "column": 8 },
"end": { "line": 1, "column": 14 },
},
"severity": 2,
"message": "[message-id] error found secret: SECRET",
"data": { "ID": "SECRET" },
"type": "lint",
}, {
"ruleId": "parent > example",
"index": 8,
"line": 1,
"column": 8,
"range": [8, 14],
"loc": {
"start": { "line": 1, "column": 8 },
"end": { "line": 1, "column": 14 },
},
"severity": 2,
"message": "[message-id] error found secret: SECRET",
"data": { "ID": "SECRET" },
"type": "lint",
}],
}, { "filePath": "[SNAPSHOT]/input.no-secret.txt", "messages": [] }];
const after = [{
"filePath": "[SNAPSHOT]/input.txt",
"sourceContent": "THIS IS SECRET SOURCE\n",
"sourceContentType": "text",
"messages": [{
"data": { "ID": "SECRET" },
"type": "message",
"message": "warning found secret: SECRET",
"messageId": "message-id",
"range": [8, 14],
"loc": {
"start": { "line": 1, "column": 8 },
"end": { "line": 1, "column": 14 },
},
"ruleId": "example",
"severity": "warning",
}, {
"data": { "ID": "SECRET" },
"type": "message",
"message": "error found secret: SECRET",
"messageId": "message-id",
"range": [8, 14],
"loc": {
"start": { "line": 1, "column": 8 },
"end": { "line": 1, "column": 14 },
},
"ruleId": "example",
"severity": "error",
}, {
"data": { "ID": "SECRET" },
"type": "message",
"message": "error found secret: SECRET",
"messageId": "message-id",
"range": [8, 14],
"loc": {
"start": { "line": 1, "column": 8 },
"end": { "line": 1, "column": 14 },
},
"ruleId": "example",
"ruleParentId": "parent",
"severity": "error",
}],
}, {
"filePath": "[SNAPSHOT]/input.no-secret.txt",
"sourceContent": "THIS IS PUBLIC SOURCE\n",
"sourceContentType": "text",
"messages": [],
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-f json
is the result of textlint's format.We should return secretlint results as json insteadof it.
Currently,
@secretlint/formatter
is wrapper of textlint's formatter #10As soon as, json formatter will be replaced native formatter.
Because, json formatter present raw results data.
The text was updated successfully, but these errors were encountered: