Beispiel #1
0
        protected bool IsConfigFile(AbsolutePath path)
        {
            Contract.Requires(path.IsValid);

            var name = path.GetName(Context.PathTable).ToString(Context.StringTable);

            return(ExtensionUtilities.IsGlobalConfigurationFile(name));
        }
Beispiel #2
0
        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);
        }