Code Quality: Enable TreatWarningsAsErrors in some projects & enable "strict" feature flag globally#18116
Open
0x5bfa wants to merge 1 commit intofiles-community:mainfrom
Open
Code Quality: Enable TreatWarningsAsErrors in some projects & enable "strict" feature flag globally#181160x5bfa wants to merge 1 commit intofiles-community:mainfrom
0x5bfa wants to merge 1 commit intofiles-community:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
TreatWarningsAsErrorsto 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolved / Related Issues
I've introduced the strict mode globally and added
TreatWarningsAsErrorsto some projects.Steps used to test these changes
None
CC: @hez2010