mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 18:00:26 +00:00
Disable logging of filtered project paths, but let user enable it in config.
This commit is contained in:
parent
da6a8f335f
commit
8d9374ee59
15
src/config.h
15
src/config.h
@ -7,12 +7,16 @@
|
||||
struct Config {
|
||||
// Root directory of the project. **Not serialized**
|
||||
std::string projectRoot;
|
||||
|
||||
std::string cacheDirectory;
|
||||
std::vector<std::string> indexWhitelist;
|
||||
std::vector<std::string> indexBlacklist;
|
||||
|
||||
std::vector<std::string> extraClangArguments;
|
||||
|
||||
std::vector<std::string> indexWhitelist;
|
||||
std::vector<std::string> indexBlacklist;
|
||||
// If true, project paths that were skipped by the whitelist/blacklist will
|
||||
// be logged.
|
||||
bool logSkippedPathsForIndex = false;
|
||||
|
||||
// Maximum workspace search results.
|
||||
int maxWorkspaceSearchResults = 1000;
|
||||
|
||||
@ -54,9 +58,12 @@ struct Config {
|
||||
};
|
||||
MAKE_REFLECT_STRUCT(Config,
|
||||
cacheDirectory,
|
||||
indexWhitelist, indexBlacklist,
|
||||
|
||||
extraClangArguments,
|
||||
|
||||
indexWhitelist, indexBlacklist,
|
||||
logSkippedPathsForIndex,
|
||||
|
||||
maxWorkspaceSearchResults,
|
||||
indexerCount,
|
||||
enableIndexing, enableCacheWrite, enableCacheRead,
|
||||
|
@ -395,9 +395,11 @@ void Project::ForAllFilteredFiles(Config* config, std::function<void(int i, cons
|
||||
if (matcher.IsMatch(entry.filename, &failure_reason))
|
||||
action(i, entries[i]);
|
||||
else {
|
||||
std::stringstream output;
|
||||
output << '[' << (i + 1) << '/' << entries.size() << "] Failed " << failure_reason << "; skipping " << entry.filename << std::endl;
|
||||
std::cerr << output.str();
|
||||
if (config->logSkippedPathsForIndex) {
|
||||
std::stringstream output;
|
||||
output << '[' << (i + 1) << '/' << entries.size() << "] Failed " << failure_reason << "; skipping " << entry.filename << std::endl;
|
||||
std::cerr << output.str();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user