Skip to content

Commit

Permalink
Improve file walk logging
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Oct 1, 2021
1 parent c537cbd commit 3986ef2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Curry/LanguageServer/Index/Store.hs
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ walkFilesIgnoringHidden = walkFilesWith $ WalkConfiguration
ignorePaths <- filterM doesFileExist $ (fp </>) <$> [".curry-language-server-ignore", ".gitignore"]
ignored <- join <$> mapM readIgnoreFile ignorePaths
unless (null ignored) $
infoM "cls.indexStore" $ "In " ++ takeFileName fp ++ " ignoring " ++ show ignored
infoM "cls.indexStore" $ "In '" ++ takeFileName fp ++ "' ignoring " ++ show (G.decompile <$> ignored)
return $ Just ignored
, wcShouldIgnore = \ignored fp -> do
isDir <- doesDirectoryExist fp
let fn = takeFileName fp
matchesFn pat = any (G.match pat) $ catMaybes [Just fn, if isDir then Just (fn ++ "/") else Nothing]
matchingIgnores = filter matchesFn ignored
unless (null matchingIgnores) $
debugM "cls.indexStore" $ "Ignoring " ++ fn ++ " since it matches " ++ show matchingIgnores
debugM "cls.indexStore" $ "Ignoring '" ++ fn ++ "' since it matches " ++ show (G.decompile <$> matchingIgnores)
return $ not (null matchingIgnores) || "." `isPrefixOf` fn
}

Expand Down

0 comments on commit 3986ef2

Please sign in to comment.