adjusted blacklist
This commit is contained in:
parent
3d4abef08d
commit
4682abb129
@ -41,7 +41,7 @@ module Main where
|
|||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = getArgs >>= process >>= finish where
|
main = getArgs >>= process >>= finish where
|
||||||
process :: [String] -> IO Bool
|
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@[_, _] = generateJSON args >> return False
|
||||||
process args@["--all", src, to] = processDirectory src to >> 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
|
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 :: FilePath -> IO ()
|
||||||
printEvents path = do
|
printEvents path = do
|
||||||
input <- BS.L.readFile path
|
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"
|
Left _ -> error "Failed to parse"
|
||||||
Right event -> putStrLn (show (eEvent event) ++ " @" ++ show (posLine $ ePos event))
|
Right event -> putStrLn (show (eEvent event) ++ " @" ++ show (posLine $ ePos event))
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ module Main where
|
|||||||
encodeFile (last args) $ buildData yaml
|
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
|
-- | Processes all workflow definitions within the given directory (1) and writes the output files
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user