cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Feature request: `cabal check` warn about duplicate entries in `default-extensions` and `other-extensions`

Open andreasabel opened this issue 1 year ago • 1 comments

From: https://github.com/haskell-hvr/cassava/commit/3f792495c1256dc2e3a503b4c5c4518dfce9c5d8#r141267172

Suggestions to improve cabal check:

  • warn about duplicates in default-extensions and other-extensions
  • warn if other-extensions repeats extensions from default-extensions

In the presence of conditionals, this should not trigger false alarms though.
Only warn about real-existing duplicates!

In the wild: https://github.com/haskell-hvr/cassava/blob/2da75c97d6b3a27675cc90fa30bc55a88d0f3da5/cassava.cabal#L67-L84

other-extensions:
    BangPatterns
    CPP
    DataKinds
    DataKinds
    DefaultSignatures
    DeriveFunctor
    FlexibleContexts
    FlexibleInstances
    KindSignatures
    MultiParamTypeClasses
    OverloadedStrings
    PolyKinds
    PolyKinds
    Rank2Types
    ScopedTypeVariables
    TypeOperators
    UndecidableInstances

andreasabel avatar Apr 23 '24 13:04 andreasabel

/cc @ffaf1

ulysses4ever avatar Apr 23 '24 14:04 ulysses4ever