From 4682abb129d9d50700dde15c24d7fbef22effc2b Mon Sep 17 00:00:00 2001 From: David Mosbach Date: Sun, 23 Jul 2023 16:05:17 +0200 Subject: [PATCH] adjusted blacklist --- app/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 1c8fa64..228cb5a 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -41,7 +41,7 @@ module Main where main :: IO () main = getArgs >>= process >>= finish where process :: [String] -> IO Bool - process [path] = runParser path >> return True + process [path] = printEvents path >> runParser path >> return True process args@[_, _] = generateJSON args >> return False process args@["--all", src, to] = processDirectory src to >> return False process _ = print "Please provide (1) a source and (2) a target file or provide '--all' and (1) a source and (2) a target directory" >> return True @@ -52,7 +52,7 @@ module Main where printEvents :: FilePath -> IO () printEvents path = do input <- BS.L.readFile path - forM_ (take 700 $ parseEvents input) $ \ev -> case ev of + forM_ (parseEvents input) $ \ev -> case ev of Left _ -> error "Failed to parse" Right event -> putStrLn (show (eEvent event) ++ " @" ++ show (posLine $ ePos event)) @@ -92,7 +92,7 @@ module Main where encodeFile (last args) $ buildData yaml - blackList = ["patch.yaml", "theses.yaml", "master-practical-training.yaml"] -- files not to parse when parsing the entire directory + blackList = ["patch.yaml"] -- files not to parse when parsing the entire directory -- | Processes all workflow definitions within the given directory (1) and writes the output files