Questions tagged [code-formatting]
focuses on legibility and consistent look of code: lexical-level intelligibility is a basic element of coding-style
60 questions
-2 votes
1 answer
124 views
Clean code: formatting rules, dependent functions, multiple calls [closed]
About formatting Here are two scenarios in which the details of the formatting are described. How should in the clean code way, this be formatted Scenario 1: Dependent functions of dependent functions ...
1 vote
1 answer
896 views
How to integrate a profiler in the least invasive way possible?
I am currently using tracy to profile a program I am writing. Tracy as a tool seems quite awesome, but it has one issue. You need to markup your code when profiling. This has the negative consequence ...
1 vote
2 answers
3k views
C# convention for empty constructor [closed]
I know an empty method without any good reason is a code smell, but it can be required for constructors. What would be a good way to write an empty constructor among the following? class A { ...
-1 votes
2 answers
620 views
What arguments in favor of automatic, mandatory, uniform code formatting in a software project? [closed]
I am the manager of a small team of software engineers. I am looking for arguments in favor of automatic, mandatory code formatting. For me it is natural, it goes with the Quality Assurance process ...
2 votes
2 answers
399 views
Where to put private computed properties?
In Clean code it's suggested that private helper functions should always exist directly below the function they're directly used within. Should I be doing this when using computed properties? It's the ...
3 votes
1 answer
477 views
Workflow for git / code formatting / commit hooks etc
Our team is growing, and with it, discontent with common coding standards being imposed on developers with alternate (strong, bordering on religious) views on what constitutes a good coding style. ...
8 votes
12 answers
7k views
How small should functions be?
I'm new at writing professional code (the bulk of my experience is with personal projects) so excuse me if this is trivial. When I write code I find myself being a little inconsistent with how much ...
1 vote
0 answers
134 views
Alternative to reorder c++ tokens
Our organization is looking to standardize the way we use const T& and T const& and while we initially looked at clang-format to solve the job, it doesn't reorder tokens so there is no way to ...