-
Notifications
You must be signed in to change notification settings - Fork 487
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
Prevent clang-format in certain places #468
Conversation
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #468 +/- ##
=========================================
Coverage 68.90% 68.91%
=========================================
Files 109 109
Lines 61793 61792 -1
=========================================
+ Hits 42579 42584 +5
+ Misses 19214 19208 -6
|
Before merging this PR, can we just clarify under which condition, developer should /* clang-format off */ flag? |
We can describe all coding rules. Now we don't have any written rules. But I don't think it should be a blocker. This (clang-format off) will probably be very rare for new code. We can do it for each PR, if it ever comes up. |
The whole point of applying clang-format is to get consistency in our code base without every committer having to read through a long documentation and reviewers spending their brain cycles in nitpicking styling issues :-). |
Right, so we can say something in CONTRIBUTING.md that we use clang-format. Disabling it should normally not be done but we can accept it in cases similar to the ones in this PR. Is that OK or do you have another idea? |
Btw, coding style can also include naming, camel/snake case and more, not covered by clang-format. |
I would like to add one tag for this pr for documentation later. No other opinion so far. |
What documentation do we need to add? |
(The PR looked fine to me) |
We can describe when it's OK vs not OK to use
Sorry I was eager to merge it. :) |
This is a preparation for adding clang-format. These comments prevent automatic formatting in some places. With these exceptions, we will be able to run clang-format on the rest of the code. This is a preparation for valkey-io#323. --------- Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Signed-off-by: Karthick Ariyaratnam <karthyuom@gmail.com>
This is a preparation for adding clang-format. These comments prevent automatic formatting in some places. With these exceptions, we will be able to run clang-format on the rest of the code. This is a preparation for valkey-io#323. --------- Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
This is a preparation for adding clang-format.
These comments prevent automatic formatting in some places. With these exceptions, we will be able to run clang-format on the rest of the code.
This is a preparation for #323.