Add string syntax attribute to `.AppendFormat()`

Open Beginner friendly
#139 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
68/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
csharp
Domain
api

Research direction

Start by locating the AppendFormat overloads in the ZString source and review how their format parameter is declared. Apply the StringSyntax attribute with the CompositeFormat value to the relevant format parameter, then verify that the public API builds and the IDE can recognize the format string.

Written by the indexing model from the issue text.

Description

Using [StringSyntax] attribute like so:

public void AppendFormat<T1>([StringSyntax(StringSyntaxAttribute.CompositeFormat)]string format, T1 arg1)

would make it so that IDEs can provide better syntax highlighting:

Image

Docs: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.stringsyntaxattribute?view=net-10.0

Dominant language
C#
Stars
2.8k
Forks
192
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Cysharp/ZString

All issues in Cysharp/ZString

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.