-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting code with an #if section #1101
Labels
Resolved-Duplicate
This issue or pull request already exists
Comments
oh, sorry, I don't know how I missed that when searching. Whoops |
@mikeage No worries. I'd much rather mark something as duplicate than not have it reported. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Given the following code:
when I run dotnet-format (with no solution or anything like that, just using
dotnet-format --folder .
(my main project is a Unity project, so it doesn't really have .sln or .csproj or anything like this; this is just a minimal example), it returns the following:Note that the code within the
#if
is unformatted.I realized that by default that code will not be compiled, but if I do, in fact,
#define SOMETHING
, then it will; is there an easy way I can tell dotnet-format to format everything, regardless of which particular defines might exist? Alternatively, I can probably call it multiple times with every definition (or combination of definitions of course) -- how do I tell it to add custom definitions?The text was updated successfully, but these errors were encountered: