From b611f7438e34849795a07561e7fc29fe22388f88 Mon Sep 17 00:00:00 2001 From: mrkun Date: Sun, 23 Jan 2022 23:43:37 +0300 Subject: [PATCH] Ban new uses of `tail` --- ghcide/.hlint.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ghcide/.hlint.yaml b/ghcide/.hlint.yaml index 72df410866..4aa51b68f4 100644 --- a/ghcide/.hlint.yaml +++ b/ghcide/.hlint.yaml @@ -139,6 +139,21 @@ - {name: unsafeCoerce, within: [Ide.Plugin.Eval.Code, Development.IDE.Core.Compile, Development.IDE.Types.Shake]} # Things that are a bit dangerous in the GHC API - {name: nameModule, within: []} + # Partials and their legacy locations + - name: tail + within: + - Development.Benchmark.Rules + - Development.IDE.Plugin.CodeAction + - Development.IDE.Plugin.CodeAction.ExactPrint + - Development.IDE.Session + # ghcide/test/exe + - Main + # plugins/hls-tactics-plugin/test + # - UnificationSpec + +# We really do not want novel usages of restricted functions, and mere +# Warning is not enough to prevent those consistently; you need a build failure. +- error: {name: Avoid restricted function} # Add custom hints for this project #