aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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