Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

AI-generated code brought typography into my repository, so I wrote a Roslyn analyzer

说明与用途

Roslyn 分析器检测代码和文档中的排版 Unicode 字符,减少差异噪声并提高仓库一致性。

问题

Typographic Unicode characters such as smart quotes, em dashes, and ellipses inadvertently enter code and documentation via copy/paste, AI-generated content, or documentation tools, causing inconsistencies in diffs, searches, and reviews.

结果

The analyzer surfaces typographic Unicode characters across code and documentation, reducing diff noise and improving repository consistency.

工作流

  • 1. Install the Coree.Analyzers.Typography NuGet package.
  • 2. Add the analyzer to the project’s .csproj or global analyzer configuration.
  • 3. Configure the set of typographic characters to flag via analyzer options.
  • 4. Run the build or IDE analysis to surface violations.
  • 5. Review and replace or approve the flagged characters in source and documentation files.

证据

It detects configurable typographic Unicode characters during development and build, and it can also inspect additional project files such as Markdown, JSON or YAML.

来源

  • 记录日期: 2026-09-21T23:45:46.677Z