Skip to content

Commit

Permalink
Add HLint workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
chungyc authored and blackgnezdo committed Oct 1, 2024
1 parent 508efc4 commit d7fa2c7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/hlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: HLint
on: [push, pull_request]

jobs:
hlint:
runs-on: ubuntu-latest
permissions:
# Needed to upload results to GitHub code scanning.
security-events: write
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: haskell-actions/hlint-scan@c81f3176108e60bbce2d5a223e9297a8406deb92 # v1.1.0
34 changes: 34 additions & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# HLint configuration file
# https://github.com/ndmitchell/hlint
##########################


# Ignore generated files.
- ignore: {within: Proto.Google.Protobuf.Descriptor}
- ignore: {within: Proto.Google.Protobuf.Descriptor_Fields}
- ignore: {within: Proto.Google.Protobuf.Compiler.Plugin}
- ignore: {within: Proto.Google.Protobuf.Compiler.Plugin_Fields}


# Warnings currently triggered by existing code.
- ignore: {name: "Avoid lambda"} # 1 hint
- ignore: {name: "Eta reduce"} # 1 hint
- ignore: {name: "Fuse foldr/map"} # 1 hint
- ignore: {name: "Move brackets to avoid $"} # 8 hints
- ignore: {name: "Redundant $"} # 23 hints
- ignore: {name: "Redundant ^."} # 2 hints
- ignore: {name: "Redundant bracket"} # 13 hints
- ignore: {name: "Unused LANGUAGE pragma"} # 11 hints
- ignore: {name: "Use :"} # 2 hints
- ignore: {name: "Use <$"} # 1 hint
- ignore: {name: "Use <$>"} # 1 hint
- ignore: {name: "Use ?~"} # 5 hints
- ignore: {name: "Use camelCase"} # 3 hints
- ignore: {name: "Use concatMap"} # 1 hint
- ignore: {name: "Use fewer imports"} # 2 hints
- ignore: {name: "Use fmap"} # 10 hints
- ignore: {name: "Use lambda-case"} # 3 hints
- ignore: {name: "Use maybe"} # 1 hint
- ignore: {name: "Use newtype instead of data"} # 1 hint
- ignore: {name: "Use replicate"} # 1 hint
- ignore: {name: "Use unless"} # 1 hint

0 comments on commit d7fa2c7

Please sign in to comment.