We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64300e2 commit f46dd8bCopy full SHA for f46dd8b
src/Aws/Lambda/Meta/Discover.hs
@@ -45,7 +45,7 @@ modulesWithHandler files =
45
&& isNotIgnoredPath file
46
47
isNotIgnoredPath file =
48
- filter ((Text.pack $ toFilePath file) `Text.isInfixOf`) ignoredPaths
+ filter (Text.isInfixOf (Text.pack $ toFilePath file)) ignoredPaths
49
& null
50
51
handlerNames :: [Path Rel File] -> [Text]
@@ -60,4 +60,7 @@ handlerNames modules =
60
containsHandler :: Path Rel File -> IO Bool
61
containsHandler file = do
62
fileContents <- readFile $ toFilePath file
63
- pure $ "handler :: " `Text.isInfixOf` Text.pack fileContents
+ lines fileContents
64
+ & filter (Text.isPrefixOf "handler :: " . Text.pack)
65
+ & (not . null)
66
+ & pure
0 commit comments