Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat warnings as errors during CI build (Lombiq Technologies: OCORE-157) #15764

Merged
merged 13 commits into from
Apr 19, 2024

Conversation

Piedone
Copy link
Member

@Piedone Piedone commented Apr 15, 2024

After #15707 we have no build warnings in CI. To ensure that this stays this way, this PR makes the CI builds fail if you leave any build warnings in the code. (Locally you can still prototype with warnings.)

This is the very first rudimentary step on the way to #7950.

I attempted this first under #15719, but then it turned out that we do have 900 build warnings. Somehow now we only have one though.

You can test this locally with:

dotnet build -c Release --no-incremental -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzersDuringBuild=true

--no-incremental makes sure you run it as it were a fresh clone.

@Piedone Piedone marked this pull request as ready for review April 15, 2024 19:12
@Piedone Piedone requested a review from sebastienros April 15, 2024 19:12
@Piedone
Copy link
Member Author

Piedone commented Apr 15, 2024

If #12364 is merged first, this line (and any other new <TreatWarningsAsErrors> elements) need to be removed.

Copy link
Member

@MikeAlhayek MikeAlhayek left a comment

Choose a reason for hiding this comment

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

LGTM

.github/workflows/mac_unit_test_ci.yml Outdated Show resolved Hide resolved
@Piedone Piedone merged commit 4bf383e into OrchardCMS:main Apr 19, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants