Skip to content

Update all projects with Nullable, AnalysisLevel, and ImplicitUsings #3958

Closed

Description

@TimothyMothra

This issue is to track the effort of updating all projects to support:

<PropertyGroup>
  <Nullable>enable</Nullable>
  <AnalysisLevel>latest-All</AnalysisLevel>
  <ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

We want these properties in any new projects (#3933 (comment)) and it will take some effort to update existing projects.

I'm planning to add these properties to the Common.props, as suggested here: #3924 (comment).
This will be on-by-default for all projects. Projects with too many errors can be disabled until updated.

Notes

  • AnalysisLevel found 1 error.
  • ImplicitUsings found 311 errors.
  • Nullable found at least 1526 errors. Likely hundreds more.
  • should be able to remove #nullable enable
  • need to remove all the #pragma warning disable IDE0005 introduced while fixing ImplicitUsings

Status

  • <Nullable>enable</Nullable>
  • <AnalysisLevel>latest-All</AnalysisLevel> (a lot of issues, it should be enabled per project. When creating PRs consider 2 separate changes - trivial fixes, and more important as separate. It will be easier to review).
  • <ImplicitUsings>enable</ImplicitUsings>

Sub Tasks

Activity

  1. added
    enhancement
    on Nov 30, 2022
  2. TimothyMothra commented on Dec 7, 2022

    @TimothyMothra
    Author

    I'm working on removing the ImplicitUsings from projects.
    This repo has a lot of shared files which complicates this setting.
    I need to remove the ImplicitUsings disable from a few projects at a time and disable the using check in shared *.cs files.

  3. TimothyMothra commented on Dec 14, 2022

    @TimothyMothra
    Author

    The latest updates for .NET fixed AnalysisLevel, which is now reporting issues.
    It detected almost 1800 issues in this repo and was blocking PRs.
    This has been disabled in the Common.props until issues can be resolved.

  4. github-actions commented on Oct 8, 2024

    @github-actions
    Contributor

    This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.

  5. added
    Stale
    on Oct 8, 2024
  6. removed
    Stale
    on Oct 8, 2024
  7. Kielek commented on Oct 8, 2024

    @Kielek
    Member

    Not stale, hopefully it will be done. We have only couple leftovers.

  8. added
    help wanted
    on Feb 12, 2025
  9. removed
    help wanted
    on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions