private static RuleAnalysisScope GetFileScope(ISourceFile file) { var fileName = Path.GetFileName(file.Path.AbsolutePath); if (ExtensionUtilities.IsModuleConfigurationFile(fileName)) { return(RuleAnalysisScope.PackageConfig); } if (ExtensionUtilities.IsGlobalConfigurationFile(fileName)) { return(RuleAnalysisScope.RootConfig); } if (ExtensionUtilities.IsBuildListFile(fileName)) { return(RuleAnalysisScope.BuildListFile); } return(RuleAnalysisScope.SpecFile); }
/// <nodoc /> public static bool IsBuildListFile([NotNull] this ISourceFile sourceFile) { Contract.Requires(sourceFile != null); return(ExtensionUtilities.IsBuildListFile(sourceFile.FileName)); }