Skip to content

Fixer to add project-level nullable enable option #52893

@jcouv

Description

@jcouv

Two scenarios:

  1. Start using nullability annotations in code that is not nullable-enabled
  • we can offer to nullable-enable the project (especially if there's only one file in the project)
  • we can offer to nullable-enable the current file
  1. From a source-level #nullable enable directive, offer to shift it to the project (as we did for roslyn here):
    This involves toggling directives in all the files in the project:
    • top-level #nullable enable in files gets removed
    • files that were not previously enabled get #nullable disable
    • #nullable restore becomes #nullable disable
    • #nullable enable in the middle of a file becomes #nullable restore

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Complete

Relationships

None yet

Development

No branches or pull requests

Issue actions