Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bare-bones test suite #1614

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions hlint.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ flag hsyaml
manual: True
description: Use HsYAML instead of yaml

library
library hlint-lib
default-language: Haskell2010
build-depends:
base == 4.*, process, filepath, directory, containers,
Expand Down Expand Up @@ -107,14 +107,15 @@ library

hs-source-dirs: src
exposed-modules:
HLint
-- this doesn't seem used anywhere in its own right?
Language.Haskell.HLint
other-modules:
Paths_hlint
Apply
CmdLine
Extension
Fixity
HLint
HsColour
Idea
Report
Expand Down Expand Up @@ -174,14 +175,18 @@ library
Test.Util
ghc-options: -Wunused-binds -Wunused-imports -Worphans -Wprepositive-qualified-module


executable hlint
default-language: Haskell2010
build-depends: base, hlint
build-depends: base, hlint-lib
main-is: src/Main.hs

-- See https://github.com/ndmitchell/hlint/pull/1169 for benchmarks
-- that indicate -A32 is a good idea
ghc-options: -rtsopts -with-rtsopts=-A32m
if flag(threaded)
ghc-options: -threaded

test-suite test-hlint
type: exitcode-stdio-1.0
main-is: tests/Main.hs
build-depends: base, hlint-lib
2 changes: 1 addition & 1 deletion misc/HLint_NoDataFiles.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Running this script should report two errors

import Data.List
import Language.Haskell.HLint
import HLint
import Language.Haskell.TH.Syntax
import Network.HTTP

Expand Down
2 changes: 1 addition & 1 deletion src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

module Main(main) where

import Language.Haskell.HLint
import HLint
import Control.Monad
import System.Environment
import System.Exit
Expand Down
5 changes: 5 additions & 0 deletions tests/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Main where

import HLint (hlint)

main = hlint ["--test"]
Loading