ataylorme / eslint-annotate-action

A GitHub action that takes ESLint results from a JSON file and adds them as annotated pull request comments
MIT License
88 stars 32 forks source link

Error with ignored file #40

Closed pmcelhaney closed 1 year ago

pmcelhaney commented 2 years ago

The first item in my report looks like this.

  {
    "filePath": "/Users/rpmcelbd/code/front-end/.github/workflows/web-ci.yaml",
    "messages": [
      {
        "fatal": false,
        "severity": 1,
        "message": "File ignored by default.  Use a negated ignore pattern (like \"--ignore-pattern '!<relative/path/to/filename>'\") to override."
      }
    ],
    "suppressedMessages": [],
    "errorCount": 0,
    "fatalErrorCount": 0,
    "warningCount": 1,
    "fixableErrorCount": 0,
    "fixableWarningCount": 0,
    "usedDeprecatedRules": []
  }

Actual

I'm getting the following error.

Empty value for parameter 'output.annotations[0].end_line': undefined

Expected

It should skip this warning because the file is ignored. It doesn't matter that there's no end_line. It should probably ignore anything that doesn't have a ruleId.

ataylorme commented 1 year ago

This should have been fixed in v2. Please re-open the issue if that is not the case.