Problem
The repository style guide explicitly forbids #region / #endregion directives ("Do NOT use #region or #endregion"), but src/Mono.Android/Android.Runtime/XmlReaderPullParser.cs still contains 3 #region blocks (6 directive lines). They violate the coding conventions. Removing them is a purely cosmetic change with no effect on behavior, public API, or generated IL — #region/#endregion are preprocessor directives that the C# compiler ignores.
Location
- File(s):
src/Mono.Android/Android.Runtime/XmlReaderPullParser.cs
- Line(s): the 6 directive lines belonging to these 3 region pairs:
#region IXmlResourceParser implementation (line 31) ... #endregion (line 36)
#region IAttributeSet implementation (line 38) ... #endregion (line 124)
#region IXmlPullParser implementation (line 148) ... #endregion (line 484)
Current Code
Example (the first, compact block):
#region IXmlResourceParser implementation
public void Close ()
{
r.Close ();
}
#endregion
Suggested Fix
Each of these region names carries useful information — it labels which interface's members follow. Per the repo convention for removing regions, preserve the useful name as a single // comment on the line that held the #region directive, and delete the matching #endregion line. Keep the tab indentation and all code between the directives exactly as-is; do not reflow or re-indent anything else.
Apply exactly these six edits:
| Line |
Current |
New |
| 31 |
#region IXmlResourceParser implementation |
// IXmlResourceParser implementation |
| 36 |
#endregion |
(delete the line) |
| 38 |
#region IAttributeSet implementation |
// IAttributeSet implementation |
| 124 |
#endregion |
(delete the line) |
| 148 |
#region IXmlPullParser implementation |
// IXmlPullParser implementation |
| 484 |
#endregion |
(delete the line) |
(The #region lines are indented with two tabs; keep the same indentation on the replacement // comments.)
Guidelines
- Follow
.editorconfig / Mono style; touch nothing other than the directive lines.
- Keep the change minimal — no unrelated formatting or blank-line churn.
- Do not delete or modify any members; only the preprocessor directives.
- This is a comment-only change and introduces no new APIs, so it compiles against every target framework of
Mono.Android.
Acceptance Criteria
Fix-finder metadata
- Script:
03-region-directives
- Score:
28/30 (actionability: 10, safety: 10, scope: 8)
Generated by Nightly Fix Finder · 119.9 AIC · ⌖ 29.1 AIC · ⊞ 9.3K · ◷
Problem
The repository style guide explicitly forbids
#region/#endregiondirectives ("Do NOT use#regionor#endregion"), butsrc/Mono.Android/Android.Runtime/XmlReaderPullParser.csstill contains 3#regionblocks (6 directive lines). They violate the coding conventions. Removing them is a purely cosmetic change with no effect on behavior, public API, or generated IL —#region/#endregionare preprocessor directives that the C# compiler ignores.Location
src/Mono.Android/Android.Runtime/XmlReaderPullParser.cs#region IXmlResourceParser implementation(line 31) ...#endregion(line 36)#region IAttributeSet implementation(line 38) ...#endregion(line 124)#region IXmlPullParser implementation(line 148) ...#endregion(line 484)Current Code
Example (the first, compact block):
Suggested Fix
Each of these region names carries useful information — it labels which interface's members follow. Per the repo convention for removing regions, preserve the useful name as a single
//comment on the line that held the#regiondirective, and delete the matching#endregionline. Keep the tab indentation and all code between the directives exactly as-is; do not reflow or re-indent anything else.Apply exactly these six edits:
#region IXmlResourceParser implementation// IXmlResourceParser implementation#endregion#region IAttributeSet implementation// IAttributeSet implementation#endregion#region IXmlPullParser implementation// IXmlPullParser implementation#endregion(The
#regionlines are indented with two tabs; keep the same indentation on the replacement//comments.)Guidelines
.editorconfig/ Mono style; touch nothing other than the directive lines.Mono.Android.Acceptance Criteria
#region ... implementationlines are converted to// ... implementationcomments (indentation preserved)#endregionlines are removedgrep -nE "#region|#endregion" src/Mono.Android/Android.Runtime/XmlReaderPullParser.csreturns nothingFix-finder metadata
03-region-directives28/30(actionability:10, safety:10, scope:8)