public override Project AddProject(Solution solution, CodeVerificationOptions options = null) { Project project = base.AddProject(solution, options); var compilationOptions = (VisualBasicCompilationOptions)project.CompilationOptions; VisualBasicCompilationOptions newCompilationOptions = compilationOptions .WithOutputKind(OutputKind.DynamicallyLinkedLibrary); var parseOptions = (VisualBasicParseOptions)project.ParseOptions; VisualBasicCodeVerificationOptions visualBasicOptions = (options != null) ? ((VisualBasicCodeVerificationOptions)options) : VisualBasicCodeVerificationOptions.Default; VisualBasicParseOptions newParseOptions = parseOptions .WithLanguageVersion(visualBasicOptions.LanguageVersion); return(project .WithCompilationOptions(newCompilationOptions) .WithParseOptions(newParseOptions)); }
public override Project AddProject(Solution solution, CodeVerificationOptions options = null) { Project project = base.AddProject(solution, options); var compilationOptions = (CSharpCompilationOptions)project.CompilationOptions; CSharpCompilationOptions newCompilationOptions = compilationOptions .WithAllowUnsafe(true) .WithOutputKind(OutputKind.DynamicallyLinkedLibrary); var parseOptions = (CSharpParseOptions)project.ParseOptions; CSharpCodeVerificationOptions csharpOptions = (options != null) ? ((CSharpCodeVerificationOptions)options) : CSharpCodeVerificationOptions.Default; CSharpParseOptions newParseOptions = parseOptions .WithLanguageVersion(csharpOptions.LanguageVersion); return(project .WithCompilationOptions(newCompilationOptions) .WithParseOptions(newParseOptions)); }
public RR0212DuplicateSwitchSectionTests() { _options = base.Options.AddAllowedCompilerDiagnosticId("CS0152"); }
public AddEmptyLineAfterUsingDirectiveListTests() { _options = base.Options.AddAllowedCompilerDiagnosticId("CS0430"); }
public RCS1174RemoveRedundantAsyncAwaitTests() { _options = base.Options.AddAllowedCompilerDiagnosticId(CompilerDiagnosticIdentifiers.UnreachableCodeDetected); }
public override Project AddProject(Solution solution, CodeVerificationOptions options) { return(base.AddProject(solution, options) .WithCompilationOptions(options.CompilationOptions) .WithParseOptions(options.ParseOptions)); }
public RCS1223MarkTypeWithDebuggerDisplayAttributeTests() { //TODO: Remove after upgrade to C# 7.2 _options = base.Options.AddAllowedCompilerDiagnosticId(CompilerDiagnosticIdentifiers.MoreThanOneProtectionModifier); }
public RR0213AddParameterToInterfaceMemberTests() { _options = base.Options.AddAllowedCompilerDiagnosticIds(new string[] { "CS0535", "CS0539" }); }
public RR0021ChangeMethodReturnTypeToVoidTests() { _options = base.Options.AddAllowedCompilerDiagnosticId(CompilerDiagnosticIdentifiers.NotAllCodePathsReturnValue); }