-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
have zig fmt notice a special comment that tells it to skip a source file #1030
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
Comments
// clang-format off Works well for cpp, maybe this would be a good fit for zig fmt as well. Just Only downside I can think of is that people use it more frequently and code does not get formatted uniquely everywhere. |
What about the git merge conflicts problem?
Our team have an rule about format code with ide or tool:
|
https://git-scm.com/docs/merge-strategies and #1037 (comment)
formatting is idempotent, applying formatting to old code over and over does thus not change anything
for special cases there will be #1030 (comment) |
It is strange that If you add a long field into a golang struct in one place, and May be there is a design bug in I know that the design bug in |
One reason for this is that |
Currently zig has 3 files that we want to always skip formatting:
Here's my idea:
If the first token in the file is a line comment that has the contents
zig fmt: skip
then zig fmt skips the file.The text was updated successfully, but these errors were encountered: