Skip to content

Commit 625477c

Browse files
authored
Merge pull request #53 from reviewdog/fix-undefined-doc
Fix Cannot read property 'docs' of undefined
2 parents 3b701ec + e55c80e commit 625477c

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

.github/workflows/reviewdog.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ jobs:
3333
with:
3434
workdir: ./test-subproject
3535
eslint_flags: 'sub-testdata/'
36+
reporter: github-check
37+
filter_mode: file

eslint-formatter-rdjson/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ module.exports = function (results, data) {
9393
severity: convertSeverity(msg.severity),
9494
code: {
9595
value: msg.ruleId,
96-
url: (data.rulesMeta[msg.ruleId].docs.url || '')
96+
url: (data.rulesMeta[msg.ruleId] ? data.rulesMeta[msg.ruleId].docs.url || '' : '')
9797
},
9898
original_output: JSON.stringify(msg)
9999
};

eslint-formatter-rdjson/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-formatter-rdjson",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "ESLint Formatter for the Reviewdog Diagnostic Format (RDFormat)",
55
"main": "index.js",
66
"scripts": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
function test() {
2-
for (var i = 0; i < 10; i--) {
2+
for (var i = 0; i < 11; i--) {
33
}
44
}

0 commit comments

Comments
 (0)