Skip to content

Support annotations #275

@dveeden

Description

@dveeden

Related: lycheeverse/lychee#1637

This is what I got working:

.github/lychee-problem-matcher.json:

{
	"problemMatcher": [
		{
			"owner": "lychee",
			"pattern": [
				{
					"regexp": "^\\[(.*)\\]:$",
					"file": 1
				},
				{
					"regexp": "^\\s*\\[ERROR\\] (.*)$",
					"message": 1,
					"loop": true
				}
			]
		}
	]
}
      - run: echo "::add-matcher::.github/lychee-problem-matcher.json"
      - name: Link Checker
        if: ${{ steps.changed-files.outputs.all_changed_files }}
        uses: lycheeverse/[email protected]
        with:
          fail: true
          args: --root-dir $(pwd) -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
          format: compact
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
          NO_COLOR: 1

Resulting in this:

Image

Image

However the line number is missing in the output, so the annotation doesn't get added to the right place in the file

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions