(&self, path: &str, project_root: &Path)
| 7012 | |
| 7013 | impl BannedHeadersChecker { |
| 7014 | fn scope_matches(&self, path: &str, project_root: &Path) -> bool { |
| 7015 | match self.scope { |
| 7016 | BannedHeadersScope::Fl => is_under_project_subpath(path, project_root, "src/fl"), |
| 7017 | BannedHeadersScope::Lib8tion => { |
| 7018 | is_under_project_subpath(path, project_root, "src/lib8tion") |
| 7019 | } |
| 7020 | BannedHeadersScope::FxSensorsPlatformsShared => { |
| 7021 | is_under_project_subpath(path, project_root, "src/fx") |
| 7022 | || is_under_project_subpath(path, project_root, "src/sensors") |
| 7023 | || is_under_project_subpath(path, project_root, "src/platforms/shared") |
| 7024 | } |
| 7025 | BannedHeadersScope::Platforms => { |
| 7026 | is_under_project_subpath(path, project_root, "src/platforms") |
| 7027 | } |
| 7028 | BannedHeadersScope::Examples => { |
| 7029 | is_under_project_subpath(path, project_root, "examples") |
| 7030 | } |
| 7031 | BannedHeadersScope::ThirdParty => { |
| 7032 | is_under_project_subpath(path, project_root, "src/third_party") |
| 7033 | } |
| 7034 | BannedHeadersScope::Tests => is_under_project_subpath(path, project_root, "tests"), |
| 7035 | } |
| 7036 | } |
| 7037 | } |
| 7038 | |
| 7039 | impl FileContentChecker for BannedHeadersChecker { |
no test coverage detected