Skip to content

Conversation

@sharwell
Copy link
Member

Closes #3992

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.49%. Comparing base (4d92a69) to head (42a3ad1).
⚠️ Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #4079    +/-   ##
========================================
  Coverage   97.48%   97.49%            
========================================
  Files        1019     1037    +18     
  Lines      118618   119302   +684     
  Branches     3465     3475    +10     
========================================
+ Hits       115633   116309   +676     
- Misses       1976     1989    +13     
+ Partials     1009     1004     -5     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sharwell sharwell marked this pull request as draft December 18, 2025 14:00
@sharwell
Copy link
Member Author

sharwell commented Dec 18, 2025

Marked as draft because this one will need additional tests for spacing around parentheses, commas, and the - character.

It looks like the VS formatter doesn't adjust anything inside a #line directive during a Format Document command (regardless of the spacing given in the line, it preserves it). The documentation for the feature shows formatting like this:

#line (1, 1) - (5, 60) 10 "partial-class.cs"

@CyrusNajmabadi can you confirm if the formatting here would be considered the canonical formatting for this feature, such that if Format Document started adjusting it, this is the form it would produce?

@CyrusNajmabadi
Copy link

I'm fine with either that, or the following:

#line (1, 1)-(5, 60) 10 "partial-class.cs"

I personally prefer the latter as it 'binds' the start-end parts tightly to eachother. Whereas the "spaces around minus" approach makes it less clear what is happening.

I do not feel strongly though, and am fine with either.

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.

Review impact of new format for #line pragma on existing rules

2 participants