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

fix: skip messages without any lines specified

Open Bastos- opened this issue 4 years ago • 3 comments

Hi ! Thanks for your awesome action :) We encounter a problem when using the action in a huge monorepo where we lint only modified files. If you lint a file ignored in .eslintignore, ESLint send a warning without any line and endline.

https://eslint.org/docs/user-guide/configuring/ignoring-code#ignored-file-warnings

Action example:

jobs:
  lint:
    name: Lint
    steps:
      - id: files
        uses: mmagician/get-changed-files@1028587c8596c55a9d03d813a48aa1377f60b087
        with:
          format: 'json'
      - run: |
          ./node_modules/.bin/eslint -c .eslintrc.js --ext ts \
            --output-file eslint_report.json --format json \
            `jq -r '.[] | select(. | endswith(".ts")) | ..' <<< '${{ steps.files.outputs.added_modified }}`

Error from eslint-annotate-action: Error: Empty value for parameter 'output.annotations[1].end_line': undefined

Bastos- avatar Jun 14 '21 14:06 Bastos-

I'm also getting this error when I ignore some files from being linting.

rlrasitha avatar Dec 20 '21 14:12 rlrasitha

For me, error text is little bit different, but conditions are the same - I have added .eslintignore file, because I don't want to analyze certain files:

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

astef-trilogy avatar Jan 16 '22 19:01 astef-trilogy

Hi all, I am making updates in a v2 refactor #44. Can you test ataylorme/eslint-annotate-action@v2

Also if you provide an ESLint JSON file with an example of these rules I will add a unit test for it.

ataylorme avatar May 02 '22 16:05 ataylorme