-
Notifications
You must be signed in to change notification settings - Fork 54
build(tests): enable nullable refs and bump LangVersion to C# 12 #797
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Why is the difference so huge? |
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.
Pull Request Overview
Modernizes the test project by enabling nullable reference types and updating the C# language version, alongside refactoring namespaces to file-scoped form.
- Set LangVersion to 12 and enabled nullable reference types.
- Converted all namespace declarations to file-scoped.
- Adjusted a helper method parameter to be explicitly nullable and changed certain assertion APIs (introducing a potential issue).
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| VersionCheckerTests.cs | Converted to file-scoped namespace. |
| TestVersionProvider.cs | Converted to file-scoped namespace. |
| TestModelBuilder.cs | File-scoped namespace; made fileName parameter nullable. |
| TestConsole.cs | File-scoped namespace refactor. |
| ScriptParserTests.cs | File-scoped namespace; changed assertion API (potential misuse). |
| ScriptInspectorTests.cs | File-scoped namespace. |
| PropertyParserTest.cs | File-scoped namespace. |
| PackageDeployerTests.cs | File-scoped namespace. |
| PackageBuilderTests.cs | File-scoped namespace; changed assertion API (potential misuse). |
| PackageAnalyzerTests.cs | File-scoped namespace. |
| ExtensionsTest.cs | File-scoped namespace. |
| DacpacTool.Tests.csproj | Enabled nullable references and bumped LangVersion to 12. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Please change to file scoped namespaces in a seperate PR (or revert)
4d5b3ab to
b2701b9
Compare
…est project - Set <LangVersion> to 12 (was 9.0) - Enable nullable reference types: <Nullable>enable</Nullable>
b2701b9 to
82d01d0
Compare
I've removed the file scoped namespace changes from this PR |
|
@nmummau Now that this is done, you should address the 300 build warnings 😄 |
enable nullable refs and bump LangVersion to C# 12 in test project
Aims to modernize the test project to current C# features and improve null-safety.