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

GitHub Action

Scan code with HLint

v0.3.1 Pre-release

Scan code with HLint

crosshair

Scan code with HLint

Scan Haskell code for possible improvements using HLint

Installation

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

              

- name: Scan code with HLint

uses: haskell-actions/hlint-scan@v0.3.1

Learn more about this action in haskell-actions/hlint-scan

Choose a version

Code scanning with HLint

This is a GitHub action which scans Haskell code using HLint and uploads its suggested improvements to GitHub code scanning.

Usage

A minimal example for setting up code scanning with HLint:

on:
  push:
    branches: ['main']

jobs:
  scan:
    name: Scan code with HLint
    runs-on: ubuntu-latest
    permissions:
      # Needed to upload results to GitHub code scanning.
      security-events: write
    steps:
      - uses: actions/checkout@v3
      - uses: haskell-actions/hlint-scan@v0

Inputs

None of the inputs are required. You only need to set them if the defaults do not work for your situation.

binary : Path to the hlint binary.

path : Path of file or directory that HLint will be told to scan.

category : String used by GitHub code scanning for matching the analyses.

Outputs

sarif-id : The ID of the uploaded SARIF file.

Note

This does not fail the workflow when HLint finds any code which could be improved. In other words, this action is not intended to be used as a status check. Instead, its goal is to file GitHub code scanning alerts. To use HLint for status checks, e.g., during pushes or pull requests, see haskell/actions/hlint-run instead.

Code of conduct

Be nice; see CODE_OF_CONDUCT.md for details.

Contributing

See CONTRIBUTING.md for details.

License

Apache 2.0; see LICENSE for details.

Disclaimer

This project is not an official Google project. It is not supported by Google, and Google specifically disclaims all warranties as to its quality, merchantability, or fitness for a particular purpose.