Enable nullable reference types solution-wide (but #nullable disabled marked for existing code)#207
Conversation
Files with non-trivial nullable warnings get #nullable disable to preserve current behavior.
|
Hm just disabling it would not be so efficient (i.e., it would not close the comment). Sure it's a first step - but why not use the We can also apply the PR (but call it "Migration to nullable types - Step 0: Enabling"). To me the title sounded (but that might be just me) like it brings also nullable types to the project, which it does not. It actually turns it on to explicitly turn it off in almost all interesting scenarios / files. What's your opinion? Merge it in - but then slowly migrate the rest of the files where applicable? (There are some scenarios where AngleSharp already makes a mistake and puts out some field as non-nullable, while it's not only nullable from a logical POV, but already used/initialized with |
|
My primary motivation was to reduce the build warning I understand there is a zero value beyond that. I likely won't have capacity to look at all nullable fixes, plus it is so far reaching I'd be concerned of not fully getting things right, so its a up for grabs. I thought this was an ok first step. |
FlorianRappl
left a comment
There was a problem hiding this comment.
Let's get this rolling. Thanks!
Types of Changes
Prerequisites
Please make sure you can check the following two boxes:
Contribution Type
What types of changes does your code introduce? Put an
xin all the boxes that apply:Description
Files with non-trivial nullable warnings get #nullable disable to preserve current behavior.
Relates to #157 (comment)
Aligns to approach seen in parent project to enable globally. and mark disable.