eslint-annotate-action icon indicating copy to clipboard operation
eslint-annotate-action copied to clipboard

Bug: For 'properties/start_column', nil is not an integer.

Open andys8 opened this issue 2 years ago • 4 comments

Issue

We see an issue where there is an error nil is not integer resulting in a hanging result / check job.

2 ESLint error(s) and 0 ESLint warning(s) found in pull request changed files.
0 ESLint error(s) and 0 ESLint warning(s) found in files outside of the pull request.

ℹ  info      Found 2 ESLint errors and warnings, processing batch 1 of 1...
✖  fatal     Invalid request.

For 'properties/start_column', nil is not an integer.
For 'properties/start_column', nil is not an integer.

Leads to dangling / hanging result lint CI job:

image

Github Action

      - name: Lint
        run: yarn lint --output-file eslint_report.json --format json
        working-directory: ./apps/dashboard/
        continue-on-error: true

      - name: Annotate Linting Results
        uses: ataylorme/[email protected]
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
          report-json: "./apps/dashboard/eslint_report.json"
          fail-on-warning: ${{ github.event_name == 'pull_request' }}
          only-pr-files: true
          check-name: "Lint Result Dashboard"

Is this an issue with the action? Can we provide more information to solve this issue?

Maybe related, but by the name: https://github.com/ataylorme/eslint-annotate-action/pull/17

andys8 avatar Nov 22 '23 12:11 andys8

@andys8 can you please provide a copy of the ESLint report .json file that causes this error? I would like to use it to build a unit test

ataylorme avatar Jan 27 '24 23:01 ataylorme

I don't think I've data or can reproduce it at this point (2 months later, setup changed), but I will keep an eye open if we encounter the issue again.

andys8 avatar Jan 28 '24 00:01 andys8

No worries, sorry for the delayed reply on my end.

ataylorme avatar Jan 28 '24 00:01 ataylorme

Encountered the issue. The output is from a client, redacted, looks roughly like this.

Main issue is likely column being null. Not sure if that's allowed / within spec, but that's likely the input and reason for the action to fail.

 {
   "filePath": "/path/to/file.json",
   "messages": [
     {
       "ruleId": "i18n-json/identical-keys",
       "severity": 2,
       "message": "my message",
       "line": 0,
       "column": null,
       "nodeType": null
     }
   ],
   "errorCount": 1,
   "warningCount": 0,
   "fixableErrorCount": 0,
   "fixableWarningCount": 0,
   "source": "{}",
   "usedDeprecatedRules": []
 }

andys8 avatar Jan 30 '24 18:01 andys8

Thanks for the example. It should be fixed in this commit in the v3-beta. I'll let you know when there is a 3.0.0 release for testing

ataylorme avatar Feb 26 '24 17:02 ataylorme

3.0.0 has been released. Please update any references to the v3 branch instead of v3-beta

ataylorme avatar Apr 19 '24 02:04 ataylorme