- Notifications
You must be signed in to change notification settings - Fork4.2k
Raise the default warning level in tests#47077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Compilers/Core/CodeAnalysisTest/Diagnostics/CompilationWithAnalyzersTests.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| publicclassAnalyzerFileReferenceAppDomainTests:TestBase | ||
| { | ||
| privateconstintMaxWarningLevel=9999; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Because this project doesn't have a reference toTestOptions, I created this const. But I don't feel this approach is good. This const is defined in a few other tests in this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Perhaps it would be reasonable to define it next to
| internalconstintDefaultWarningLevel=4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Why isn't max warning level justint.MaxValue ?
Youssef1313Aug 24, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It should work, but it was documentedhere as 9999 so I matched that.
Youssef1313 commentedAug 24, 2020
@jaredpar@RikkiGibson I've addressed your feedback and also updated more tests (there are still a few other tests that needs to be updated too). |
Uh oh!
There was an error while loading.Please reload this page.
src/Compilers/CSharp/Test/Emit/Attributes/InternalsVisibleToAndStrongNameTests.csShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Compilers/Core/CodeAnalysisTest/Diagnostics/CompilationWithAnalyzersTests.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Compilers/CSharp/Test/Emit/PDB/CSharpDeterministicBuildCompilationTests.cs OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Youssef1313 commentedSep 30, 2020
Pinging@RikkiGibson |
RikkiGibson commentedOct 5, 2020
I think we should include the new warning in |
Youssef1313 commentedOct 5, 2020
@RikkiGibson I included it. Can you re-run the failed jobs? the current failures seem unrelated to the changes. If this is ready to go, you may want consider a squash/merge. The number of commits here is unnecessarily large |
Youssef1313 commentedOct 5, 2020
@RikkiGibson Build is green now. |
RikkiGibson commentedOct 16, 2020
@dotnet/roslyn-compiler for another review. It's a test only change, but sweeping enough that it feels like getting another pair of eyes on it would be good. Suggest starting with the following files:
Then skimming the rest of it. |
jcouv commentedOct 16, 2020
Looking |
Youssef1313 commentedOct 16, 2020
Note: commit-by-commit review isnot recommended at all, the commits here are messy. I'd also recommend a squash/merge to not pollute the master history. |
| /// <param name="optimizationLevel">The optimization level of the created compilation options.</param> | ||
| /// <param name="allowUnsafe">A boolean specifying whether to allow unsafe code. Defaults to false.</param> | ||
| /// <returns>A CSharpCompilationOptions with the specified <paramref name="outputKind"/>, <paramref name="optimizationLevel"/>, and <paramref name="allowUnsafe"/>.</returns> | ||
| internalstaticCSharpCompilationOptionsCreateTestOptions(OutputKindoutputKind,OptimizationLeveloptimizationLevel,boolallowUnsafe=false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
internal [](start = 8, length = 8)
private? Never mind. Somehow did a bad search ;-) #Closed
jcouv left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM Thanks (iteration 43). I'll re-run CI to make sure we didn't introduce new conflicts this the PR was last run.
Youssef1313 commentedOct 16, 2020
@jcouv That was already done. The current CI run was succeeded 2 hours ago in 1h 44m 11s |
RikkiGibson commentedOct 17, 2020
Thanks for the contribution@Youssef1313! |
Uh oh!
There was an error while loading.Please reload this page.
Fixes#46976
@RikkiGibson Could you have a look if what I'm doing until now is the correct thing?