2017-12-21 17:32:22 +00:00
|
|
|
require "language/haskell"
|
|
|
|
|
|
|
|
class Hlint < Formula
|
|
|
|
include Language::Haskell::Cabal
|
|
|
|
|
|
|
|
desc "Haskell source code suggestions"
|
|
|
|
homepage "https://github.com/ndmitchell/hlint"
|
2018-01-19 17:51:16 +00:00
|
|
|
url "https://hackage.haskell.org/package/hlint-2.0.15/hlint-2.0.15.tar.gz"
|
|
|
|
sha256 "4de8df4a3fc46f7f3708f8b24acd286a310b36379a2866e5e419619d644b3e4d"
|
2017-12-21 17:32:22 +00:00
|
|
|
head "https://github.com/ndmitchell/hlint.git"
|
|
|
|
|
2018-01-19 13:07:17 +00:00
|
|
|
bottle do
|
2018-01-19 18:05:36 +00:00
|
|
|
sha256 "3adf9d9731c14c6910bd8509fae2921593aaa2dfc52bfd6cc274dc7362f293eb" => :high_sierra
|
|
|
|
sha256 "8b99e07fb3271b3b29e0d54b87ea53bccdba87976638b59a778ae2e6732c2a59" => :sierra
|
|
|
|
sha256 "c72bff8ec916975cf7b69e24cfe2863dca60f185d439d31d4051617770b791f4" => :el_capitan
|
2018-01-19 13:07:17 +00:00
|
|
|
end
|
|
|
|
|
2017-12-21 17:32:22 +00:00
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
depends_on "ghc" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
install_cabal_package :using => "happy"
|
|
|
|
man1.install "data/hlint.1"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.hs").write <<~EOS
|
|
|
|
main = do putStrLn "Hello World"
|
|
|
|
EOS
|
|
|
|
assert_match "Redundant do", shell_output("#{bin}/hlint test.hs", 1)
|
|
|
|
end
|
|
|
|
end
|