Skip to content

wandnz/action-lint-annotations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action: Lint Annotations

Create annotations from log output on your GitHub Actions workflows using problem matchers for common linters (see list below).

Inputs

Variable Default Description
problem_matchers "all" Space-separated list of problem matchers to select (without .json file extension)
enable "true" Whether to add or remove problem matchers

Available problem matchers

  • actionlint
  • ansible-lint (requires --parseable flag or parseable: true in config)
  • black
  • eslint
  • isort
  • markdownlint
  • mypy
  • pycodestyle-error (also works for linters that use the same output format, like flake8)
  • pycodestyle-warning (also works for linters that use the same output format, like flake8)
  • pydocstyle
  • pylint-error
  • pylint-warning
  • shellcheck (requires shellcheck >= 0.8.0)
  • vulture
  • yamllint (requires --format parsable)

Sample usage

---
name: Lint checks

on:
  push:
    branches-ignore:
      - main
  pull_request:
    branches:
      - main

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repo
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Enable annotations
        uses: wandnz/action-lint-annotations@v1
      - name: Lint code base
        uses: github/super-linter/slim@v4
        env:
          VALIDATE_ALL_CODEBASE: false
          DEFAULT_BRANCH: main
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

If you want to select specific problem matchers:

      - name: Enable annotations
        uses: wandnz/action-lint-annotations@v1
        with:
          problem_matchers: >-
            pylint-error
            pylint-warning

If you want to disable problem matchers

      - name: Disable annotations
        uses: wandnz/action-lint-annotations@v1
        with:
          enable: "false"

About

GitHub Action to load problem matchers for common linters so their output is displayed as GitHub Action Annotations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages