MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / AddIgnorePatternsFromFile

Method AddIgnorePatternsFromFile

CodeFormat/src/FormatContext.cpp:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void FormatContext::AddIgnorePatternsFromFile(std::string_view ignoreFile) {
56 std::fstream fin(std::string(ignoreFile), std::ios::in);
57 if (fin.is_open()) {
58 std::string line;
59 while (!fin.eof()) {
60 std::getline(fin, line);
61 if (auto newLine = string_util::TrimSpace(line); !string_util::StartWith(newLine, "#")) {
62 _ignorePattern.emplace_back(newLine);
63 }
64 }
65 }
66}
67
68void FormatContext::AddIgnorePattern(std::string_view pattern) {
69 _ignorePattern.emplace_back(pattern);

Callers 2

InitFormatFunction · 0.80
InitCheckFunction · 0.80

Calls 2

stringFunction · 0.85
is_openMethod · 0.45

Tested by

no test coverage detected