Added Camel_Snake_Case and camel_Snake_Back
class Camel_Snake_Case_Class_Name { void private_Camel_Snake_Back_Method_Name(); }
Differential D21472
[clang-tidy] readability-identifier-naming - support for other case types JamesReynolds on Jun 17 2016, 7:54 AM. Authored by
Details Added Camel_Snake_Case and camel_Snake_Back class Camel_Snake_Case_Class_Name { void private_Camel_Snake_Back_Method_Name(); }
Diff Detail
Event TimelineComment Actions I'm not 100% sure that my regexes are the best balance between readability and terseness - or that I've named the case types particularly well. If there are better ideas for either of those things I'm very happy to accept criticism! Comment Actions IIUC, Stroustrup style mandates Single_capital_letter_to_start_a_type_name (http://www.stroustrup.com/Programming/PPP-style.pdf). So both styles you're adding in this patch should not be named after Stroustrup. Also, do these come from real-life projects/requirements or is it just a desire to add eVERYpOSSIBLEsTYLEiNtHEwORLD? ;) Comment Actions Ah, I took this from a single example in the CPP core guidelines - that PDF is indeed a very different style. An idea we toyed with was "UpperSeparated" and "UpperSeparatedBack"? Would that work? This comes from a concession to Window developers in a large commercial codebase with a Windows origin. I'll admit it isn't my favourite style but for class names and functions it eventually grows on you. At least I got them to let go of the SHOUTING_TYPEDEFS..! Comment Actions You mean Upper_Separated and upper_Separated_Back? ;) Actually, these names are not particularly clear. I've managed to find "Camel_Snake_Case" used for exactly this naming convention (in the https://github.com/t6/camel_snake_kebab library). Maybe "camel_Snake_Back" as well?
I just wanted to hear that this is actually going to be used. No objections. Comment Actions
Thank you, a very good find! I've changed the patch accordingly. Comment Actions Thank you! Can you land this for me please? This is me done for the time being, but once our implementation gets into the swing of things I'll try and start picking up some bugs / enhancements. |