MCPcopy Create free account
hub / github.com/WinMerge/winmerge / TestFileDiffItemAgainstFilter

Method TestFileDiffItemAgainstFilter

Src/FileFilter.cpp:321–335  ·  view source on GitHub ↗

* @brief Test given DIFFITEM against filefilter. * @param [in] di DIFFITEM to test * @return true if DIFFITEM passes the filter */

Source from the content-addressed store, hash-verified

319 * @return true if DIFFITEM passes the filter
320 */
321bool FileFilter::TestFileDiffItemAgainstFilter(const DIFFITEM& di) const
322{
323 bool matched = TestAgainstRegList(&filefilters, di);
324 if (!matched && TestAgainstExpressionList(&fileExpressionFilters, di))
325 matched = true;
326 if (matched)
327 {
328 matched = !TestAgainstRegList(&filefiltersExclude, di);
329 if (matched)
330 matched = !TestAgainstExpressionList(&fileExpressionFiltersExclude, di);
331 }
332 if (matched)
333 return !default_include;
334 return default_include;
335}
336
337/**
338 * @brief Test given directory name against filefilter.

Callers 1

includeFileMethod · 0.80

Calls 1

TestAgainstRegListFunction · 0.85

Tested by

no test coverage detected