freckle / grep-action

GitHub Action to run grep and attach results as annotations
MIT License
1 stars 0 forks source link

Grep Action

Run grep and report results, along with additional context, as annotations.

Motivation

This is a shameless copy of Code Climate's grep engine (license), implementing the same functionality as a GitHub Action.

The grep engine is a low-friction way to introduce automated, timely, and useful feedback on any piece of incoming code you can target with a regular expression.

We wanted it as a GitHub Action to gain:

Note that if you're considering using this Action over Code Climate, you will lose:

Usage

on:
  pull_request:

jobs:
  grep:
    runs-on: ubuntu-latest
    steps:
      - uses: freckle/grep-action@v1
        with:
          patterns: |
            - pattern: "\\bword\\b"

              syntax: extended

              binary-files: without-match

              paths:
                - "**/*"

              paths-ignore:
                - "test/**/*"

              level: warning

              title: A brief title

              message: |
                A longer message body

Inputs

See ./action.yml for complete details.

The patterns Input

The patterns input is a String (as all inputs must be) that contains a Yaml Array of Objects with the following keys:

Outputs

None.

Example


LICENSE