ci: fixing issues around Standards check#4089
Open
michalChrobot wants to merge 9 commits into
Open
Conversation
Member
Author
|
I could also just automatically push fixes via usual Standards job but then devs wouldn't have control over it. I guess there may be some cases where you wouldn't want to push everything as the job says? |
michalChrobot
commented
Jul 16, 2026
| "com.unity.ide.visualstudio": "2.0.27", | ||
| "com.unity.multiplayer.center": "1.0.0", | ||
| "com.unity.netcode.gameobjects": "https://github.com/Unity-Technologies/com.unity.netcode.gameobjects.git?path=com.unity.netcode.gameobjects#develop-2.0.0", | ||
| "com.unity.purchasing": "4.12.2", |
Member
Author
There was a problem hiding this comment.
Removed across projects as this version was deprecated (+ I don't think we need this package)
Member
Author
|
Example results of queued job are in 9134d7e |
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop-2.0.0 #4089 +/- ##
=================================================
+ Coverage 66.39% 66.45% +0.06%
=================================================
Files 163 163
Lines 24999 24999
=================================================
+ Hits 16597 16614 +17
+ Misses 8402 8385 -17
Flags with carried forward coverage won't be shown. Click here to find out more. see 4 files with indirect coverage changes
|
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.
Purpose of this PR
The
Standards CheckCI job was failing on formatting that could not be reproduced or fixed locally (EXAMPLE). Investigation found 2 independent causes:dotnet format, whose Roslyn formatter behaves differently across SDK feature bands (e.g.10.0.2xxvs10.0.3xx). CI and local machines floated to whatever SDK was installed, so the same code formatted differently in each place.SyncSolution(so the generated.csprojreference paths resolve) and the right SDK. Without a complete editor install the style pass silently loads no references and reports a false "no issues", while stale.csprojHintPaths (pointing at an uninstalled editor) produceRequired references did not load.Usually what was happening is that you could see that CI used 6000.3 editor and 10.0.300 dotnet sdk version while I was using 10.0.230 and 6000.0 editor so standards run could generate different results
Changes
global.jsonwhich pins the .NET SDK to the10.0.3xxfeature band (rollForward: latestPatch) sodotnet formatuses the same Roslyn formatter locally and in CI.Since this may be a bit time consuming and annoying I also added a dedicated
standards_fix_and_pushYamato job. This is a dedicated, manually-run job** (intentionally not wired into any trigger pipeline). It runs the samenetcode.standards --fixthe check runs, for every project, then commits and pushes the formatting result back to the branch so the check passes. This removes the local editor/SDK setup burden.How one should use it is if you see standards failure and you are sure you want to apply all changes then you can just run that job from CI
Jira ticket
N/A
Documentation
N/A
Testing & QA (How your changes can be verified during release Playtest)
Tested on ... changes that now are being fixed locally correctly
Backports
N/A