Skip to content

fix: UpdateEditorConfig condition for single-targeting projects#490

Merged
samtrion merged 2 commits into
mainfrom
fix/update-editor-config-condition
Jul 26, 2026
Merged

fix: UpdateEditorConfig condition for single-targeting projects#490
samtrion merged 2 commits into
mainfrom
fix/update-editor-config-condition

Conversation

@samtrion

@samtrion samtrion commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • UpdateEditorConfig's condition compared IsCrossTargetingProject to IsCrossTargetingBuild; the latter is undefined on normal single-targeting builds, so the target never ran for the common case (single TargetFramework projects). Condition rewritten to explicitly handle both single- and cross-targeting builds.

Test plan

  • Added tests exercising real target execution: single-targeting projects get .editorconfig copied, and a cross-targeting inner build does not re-run the copy.
  • Full test suite passes.

Summary by CodeRabbit

  • Bug Fixes

    • Improved editor configuration generation for cross-targeting and standard builds.
    • Prevented editor configuration files from being generated when cross-targeting conditions are not met.
  • Tests

    • Added coverage verifying editor configuration creation and suppression under applicable build conditions.
    • Improved test reliability by preventing concurrent MSBuild operations.

… projects

The condition compared IsCrossTargetingProject to IsCrossTargetingBuild,
but the latter is undefined on normal single-targeting builds, so the
target never ran for the common case. The condition now explicitly
handles both single- and cross-targeting builds.
@samtrion
samtrion requested a review from a team as a code owner July 26, 2026 18:27
@samtrion
samtrion requested review from Hnogared and removed request for a team July 26, 2026 18:27
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@samtrion, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b211a015-e784-46cd-948c-ecf811c96a84

📥 Commits

Reviewing files that changed from the base of the PR and between 86b9f9e and 445a669.

📒 Files selected for processing (1)
  • src/NetEvolve.Defaults/buildMultiTargeting/SupportAdditionalFiles.targets

Walkthrough

Changes

EditorConfig target gating

Layer / File(s) Summary
Build test synchronization
tests/NetEvolve.Defaults.Tests.Unit/MSBuildProjectFixture.cs
MSBuild target execution is serialized with a shared lock, and the evaluated project exposes its temporary directory path.
Target condition and coverage
src/NetEvolve.Defaults/buildMultiTargeting/SupportAdditionalFiles.targets, tests/NetEvolve.Defaults.Tests.Unit/SupportAdditionalFilesTests.cs
UpdateEditorConfig uses explicit cross-targeting conditions, with tests covering both copied and absent .editorconfig files.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: hnogared

Poem

I’m a rabbit hopping through the build,
Where editor configs bloom when willed.
Locks keep the pathways calm and bright,
Cross-targeting chooses right.
Tests thump softly: pass, pass, hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing the UpdateEditorConfig condition for single-targeting projects.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@samtrion samtrion self-assigned this Jul 26, 2026
@samtrion samtrion added state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:bug Indicates an issue or flaw that needs to be fixed. labels Jul 26, 2026
@samtrion samtrion changed the title Fix UpdateEditorConfig condition for single-targeting projects fix: UpdateEditorConfig condition for single-targeting projects Jul 26, 2026
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (24d8501) to head (445a669).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #490   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           16        16           
  Branches         1         1           
=========================================
  Hits            16        16           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samtrion
samtrion merged commit 5c198ed into main Jul 26, 2026
14 checks passed
@samtrion
samtrion deleted the fix/update-editor-config-condition branch July 26, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:bug Indicates an issue or flaw that needs to be fixed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant