aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-18 21:57:54 +0200
committerŁukasz Hanuszczak <lukasz.hanuszczak@gmail.com>2015-08-22 23:40:27 +0200
commit9ff514d4da431955db26cf4e64b68a8e219161b9 (patch)
treed954a6ecdf718a3b8c3086f8dcb67e44978d5802
parenteff66b0bbf6f7ccc8f24ab21131be59b137fea47 (diff)
Specify ignored files for hyperlinker source test runner.
-rw-r--r--hypsrc-test/Main.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/hypsrc-test/Main.hs b/hypsrc-test/Main.hs
index b1b48ca4..7fa4a705 100644
--- a/hypsrc-test/Main.hs
+++ b/hypsrc-test/Main.hs
@@ -1,6 +1,7 @@
{-# LANGUAGE CPP #-}
+import Data.Char
import Data.List
import System.Environment
@@ -23,8 +24,20 @@ checkConfig = CheckConfig
dirConfig :: DirConfig
-dirConfig = defaultDirConfig $ takeDirectory __FILE__
+dirConfig = (defaultDirConfig $ takeDirectory __FILE__)
+ { dcfgCheckIgnore = checkIgnore
+ }
main :: IO ()
main = runAndCheck =<< parseArgs checkConfig dirConfig =<< getArgs
+
+
+checkIgnore :: FilePath -> Bool
+checkIgnore file
+ | and . map ($ file) $ [isHtmlFile, isSourceFile, isModuleFile] = False
+ where
+ isHtmlFile = (== ".html") . takeExtension
+ isSourceFile = (== "src") . takeDirectory
+ isModuleFile = isUpper . head . takeBaseName
+checkIgnore _ = True