You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
format is not idempotent for #if/#else around assembly attributes #1949
csharpier format takes two runs to settle on this file, so check rejects the output of a single format. Rerunning format doesn't fix it because the cache skips the file, so only format --no-cache gets check to pass. Reproduces on 1.2.6, 1.3.0 and 1.4.1 in an empty directory with no configuration. Removing either the using or the class makes it idempotent.
Steps to Reproduce
printf'using System;\n\n#if A\n[assembly: X]\n#else\n[assembly: Y]\n#endif\n\nclass C { }\n'> Repro.cs
csharpier format Repro.cs
csharpier check Repro.cs
Error .\Repro.cs - Was not formatted.
----------------------------- Expected: Around Line 6 -----------------------------
#else
----------------------------- Actual: Around Line 6 -----------------------------
#else
[assembly: Y]
format --no-cache adds a second blank line before #else, after which the file is stable.
Activity
chore(tools): bump csharpier to 1.4.2 (#36)
Bump csharpier from 1.4.1 to 1.4.2 (#536)
Bump the nuget-deps group with 2 updates (#625)
Bump the nuget-deps group with 2 updates (#626)
Bump csharpier from 1.4.1 to 1.4.2 (#293)
chore(deps): Bump csharpier from 1.0.0 to 1.4.2 (#156)
Bump CSharpier.MsBuild and 7 others (#817)