1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00

Exclude vendor directory from globbing

This commit is contained in:
Timothy Clem 2018-04-23 15:47:56 -07:00
parent 7f95a26720
commit 0da504a6e3

View File

@ -89,7 +89,7 @@ readBlobsFromPaths files = catMaybes <$> traverse readFile files
readProjectFromPaths :: MonadIO m => Maybe FilePath -> NonEmpty File -> m Project
readProjectFromPaths root files = do
paths <- liftIO $ filter (/= entryPointPath) <$> fmap fold (globDir (compile . mappend "**/*." <$> exts) rootDir)
paths <- liftIO $ filter (/= entryPointPath) <$> fmap fold (globDir (compile . mappend "[^vendor]**/*." <$> exts) rootDir)
pure $ Project files rootDir (toFile <$> paths)
where
toFile path = File path (languageForFilePath path)