| 53 | } |
| 54 | |
| 55 | void 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 | |
| 68 | void FormatContext::AddIgnorePattern(std::string_view pattern) { |
| 69 | _ignorePattern.emplace_back(pattern); |
no test coverage detected