Skip to content

Code Quality: Enable TreatWarningsAsErrors in some projects & enable "strict" feature flag globally#18116

Open
0x5bfa wants to merge 1 commit intofiles-community:mainfrom
0x5bfa:5bfa/CQ-StrictRoslyn
Open

Code Quality: Enable TreatWarningsAsErrors in some projects & enable "strict" feature flag globally#18116
0x5bfa wants to merge 1 commit intofiles-community:mainfrom
0x5bfa:5bfa/CQ-StrictRoslyn

Conversation

@0x5bfa
Copy link
Member

@0x5bfa 0x5bfa commented Feb 1, 2026

Resolved / Related Issues

I've introduced the strict mode globally and added TreatWarningsAsErrors to some projects.

Steps used to test these changes

None

CC: @hez2010

Copilot AI review requested due to automatic review settings February 1, 2026 12:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves code quality by enabling stricter compiler settings across multiple projects in the Files application. It enables the TreatWarningsAsErrors flag in four specific projects and globally enables Roslyn's "strict" compilation mode via the Features property.

Changes:

  • Added TreatWarningsAsErrors to Files.Shared, Files.Core.Storage, Files.App.CsWin32, and Files.App.BackgroundTasks projects
  • Enabled Roslyn's "strict" feature flag globally in Directory.Build.props

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Directory.Build.props Added global "strict" Roslyn compilation mode and improved formatting with comments
src/Files.Shared/Files.Shared.csproj Added TreatWarningsAsErrors to treat compiler warnings as build errors
src/Files.Core.Storage/Files.Core.Storage.csproj Added TreatWarningsAsErrors to treat compiler warnings as build errors
src/Files.App.CsWin32/Files.App.CsWin32.csproj Added TreatWarningsAsErrors to treat compiler warnings as build errors
src/Files.App.BackgroundTasks/Files.App.BackgroundTasks.csproj Added TreatWarningsAsErrors to treat compiler warnings as build errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yair100 yair100 added the ready for review Pull requests that are ready for review label Feb 1, 2026
@0x5bfa 0x5bfa changed the title Code Quality: Enable TreatWarningsAsErrors in a few projects & enable "strict" feature flag globally Code Quality: Enable TreatWarningsAsErrors in some projects & enable "strict" feature flag globally Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Pull requests that are ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments