Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
search

GitHub Action

Dart Analyze with Annotations

v1

Dart Analyze with Annotations

search

Dart Analyze with Annotations

A GitHub action to run Dart analyzer with annotation support

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Dart Analyze with Annotations

uses: invertase/github-action-dart-analyzer@v1

Learn more about this action in invertase/github-action-dart-analyzer

Choose a version

⚒️ GitHub Action for Dart Analyzer

A GitHub action to run Dart analyzer with annotation support.

License


Usage

name: "analyze"
on: # rebuild any PRs and main branch changes
  pull_request:
  push:
    branches:
      - main

jobs:
  dart: # make sure the action works on a clean machine without building
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: dart-lang/setup-dart@v1
      - uses: invertase/github-action-dart-analyzer@v1
        with:
          # (Optional) Treat info level issues as fatal.
          fatal-infos: false

          # (Optional) Treat warning level issues as fatal
          # (defaults to true).
          fatal-warnings: false

          # (Optional) Whether to add annotations to GitHub actions summary / PR
          # review files.
          # (defaults to true).
          annotate: true

          # (Optional) If set to true only annotations will be created and the
          # GitHub action itself will not fail on Dart analyzer problems. 
          # (defaults to false).
          annotate-only: false

          # (Optional) The working directory to run the Dart analyzer in 
          # (defaults to `./`).
          working-directory: ./

Screenshots

Example annotation output in PR changes review:

  1. image
  2. image
  3. image

Example annotation output in check summary:

image

Example workflow logs output:

image


Built and maintained by Invertase.