예제 #1
0
        private ISourceFile ValidateSourceFile(AbsolutePath path, ISourceFile sourceFile, RuntimeModelContext runtimeModelContext, LoggingContext loggingContext)
        {
            var sw = Stopwatch.StartNew();

            // Should not analyze file with parser errors, but it is ok to analyze with binding errors.
            if (!sourceFile.HasDiagnostics())
            {
                m_linter.AnalyzeSpecFile(sourceFile, runtimeModelContext.Logger, loggingContext, runtimeModelContext.PathTable, m_workspace);
            }

            m_statistics.AnalysisCompleted(path, sw.Elapsed);

            return(sourceFile);
        }