Skip to content

Fill and review API documentation#174

Merged
mattleibow merged 1 commit into
mainfrom
automation/write-api-docs
Jul 2, 2026
Merged

Fill and review API documentation#174
mattleibow merged 1 commit into
mainfrom
automation/write-api-docs

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What this PR does

Daily two-pass docs-format-docs + reviewer sweep over the SkiaSharp API docs. The lint pass came up clean for the second day in a row, so this run is a reviewer-driven pass that targets a long-standing class of CRITICAL defects the deterministic linter cannot catch: obsolete-API usage in code examples (see references/obsolete-api-map.md).

  • Filled: 0 files (no To be added. placeholders anywhere in SkiaSharpAPI/).
  • Reviewed: 406 type files scanned by docs-format-docs (0 findings), plus a manual reviewer-B sweep over every <![CDATA[ ... ```csharp ]]> example in SkiaSharpAPI/SkiaSharp/. 3 files needed CRITICAL fixes.
  • Fixed: all 3 CRITICAL findings (see below). Nothing deferred.

Findings summary

Severity Count
CRITICAL 3
IMPORTANT 0
MINOR 0

Coverage gaps: none — every type file was scanned by the lint, every example block under SkiaSharpAPI/SkiaSharp/ was grep-audited for the obsolete-API patterns in obsolete-api-map.md §1 and §2.

Assessment: Ready for release — both lint passes are green (0 findings, 0 errors) and the three CRITICAL examples now compile against the modern API.

CRITICAL

  • SkiaSharpAPI/SkiaSharp/SKPaint.xml · T:SkiaSharp.SKPaint — Type-level Simple Example used the obsolete SKPaint.TextSize / TextScaleX properties (compile-error obsolete per binding/SkiaSharp/SKPaint.cs:377-415) and the obsolete SKCanvas.DrawText(string, float, float, SKPaint) overload (binding/SkiaSharp/SKCanvas.cs:769). → Rewrote to create SKFont { Size = 64.0f } / SKFont { Size = 64.0f, ScaleX = 1.5f } and call the modern canvas.DrawText(text, x, y, SKTextAlign.Left, font, paint) overload. Also added using to the SKPaint locals so the example is IDisposable-correct.
  • SkiaSharpAPI/SkiaSharp/SKCanvas.xml · T:SkiaSharp.SKCanvas (MemberGroup DrawText) — Example used paint.TextSize, paint.TextAlign, paint.TextScaleX and three calls to the obsolete DrawText(string, float, float, SKPaint) overload. → Rewrote each of the three drawing blocks to allocate a per-block using var font = new SKFont { Size = 64.0f[, ScaleX = 1.5f] } and call canvas.DrawText("Skia", x, y, SKTextAlign.{Left|Center|Right}, font, paint).
  • SkiaSharpAPI/SkiaSharp/SKTypeface.xml · T:SkiaSharp.SKTypeface (MemberGroup FromFile) — Example used new SKPaint { TextSize = 50, Typeface = tf } (both properties are compile-error obsolete on SKPaint) and the obsolete 4-arg DrawText overload. → Rewrote with using var font = new SKFont(tf, size: 50) and canvas.DrawText("SkiaSharp", 50, 100, SKTextAlign.Left, font, paint). Added using to the typeface, font and paint locals.

Machine-readable findings

FINDING | CRITICAL | SKPaint    | SkiaSharpAPI/SkiaSharp/SKPaint.xml    | T:SkiaSharp.SKPaint                       | obsolete-api: example used SKPaint.TextSize/TextScaleX and DrawText(string,float,float,SKPaint); rewritten with SKFont and modern DrawText overload
FINDING | CRITICAL | SKCanvas   | SkiaSharpAPI/SkiaSharp/SKCanvas.xml   | T:SkiaSharp.SKCanvas:M:DrawText            | obsolete-api: DrawText MemberGroup example used SKPaint.TextSize/TextAlign/TextScaleX and DrawText(string,float,float,SKPaint); rewritten with SKFont and modern DrawText overload
FINDING | CRITICAL | SKTypeface | SkiaSharpAPI/SkiaSharp/SKTypeface.xml | T:SkiaSharp.SKTypeface:M:FromFile          | obsolete-api: FromFile MemberGroup example used SKPaint.TextSize/Typeface and DrawText(string,float,float,SKPaint); rewritten with SKFont(typeface, size) and modern DrawText overload

Validation

  • dotnet cake --target=docs-format-docs (pass 1, before edits): Documentation missing in 0/430 (0.0%) types and 0/5022 (0.0%) members. Docs lint: scanned 406 type file(s), 0 finding(s), 0 error(s).
  • dotnet cake --target=docs-format-docs (pass 2, after edits): same result — 0 finding(s), 0 error(s). XML and CDATA remain well-formed.
  • Touched only <Docs> content (CDATA-wrapped Markdown examples). No signatures, member declarations, or generated files were modified.
  • Generated files explicitly excluded from the commit: SkiaSharpAPI/index.xml, SkiaSharpAPI/ns-*.xml, SkiaSharpAPI/_filter.xml, SkiaSharpAPI/FrameworksIndex/.

Generated by Auto API Docs Writer · ● 27.7M ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 41ac799:

✅ Validation status: passed

File Status Preview URL Details
SkiaSharpAPI/SkiaSharp/SKCanvas.xml ✅Succeeded
SkiaSharpAPI/SkiaSharp/SKPaint.xml ✅Succeeded
SkiaSharpAPI/SkiaSharp/SKTypeface.xml ✅Succeeded

For more details, please refer to the build report.

@mattleibow
mattleibow merged commit 9be417b into main Jul 2, 2026
3 checks passed
@mattleibow
mattleibow deleted the automation/write-api-docs branch July 2, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant