CHANGE: Add CI job to check Editor references in Runtime code#2413
Open
jfreire-unity wants to merge 7 commits intodevelopfrom
Open
CHANGE: Add CI job to check Editor references in Runtime code#2413jfreire-unity wants to merge 7 commits intodevelopfrom
jfreire-unity wants to merge 7 commits intodevelopfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2413 +/- ##
===========================================
+ Coverage 78.13% 78.71% +0.58%
===========================================
Files 483 755 +272
Lines 98770 137571 +38801
===========================================
+ Hits 77169 108294 +31125
- Misses 21601 29277 +7676
Flags with carried forward coverage won't be shown. Click here to find out more. |
Collaborator
Author
|
/crc |
Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com>
Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com>
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.
Description
Following #2321 we lack the way to validate that new code added to Runtime folder doesn't contain Editor references. This is because we don't have the code in 2 separate assemblies. There might be a better way of achieving this by creating a proper test or somekind of C# code analyzer.
But at this stage, having something is better than nothing.
A text based search using
grepseems fast enough, and the script can potentially be added to run in a commit hook.It runs and fails like this:
Logs:
Testing status & QA
PS:⚠️ It's currently macOS only but can potentially be converted to a PowerShell script for Windows as well
Overall Product Risks
Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.
Comments to reviewers
The script was built with LLM help so let me know if something is not clear.
Checklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.