We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7380643 commit db877ceCopy full SHA for db877ce
src/code-quality/languages/cpp/cpp.vistor.ts
@@ -61,14 +61,17 @@ export class CPPQualityVisitor
61
}
62
63
private isSnakeCase(text: string): boolean {
64
- for (let i = 0; i < text.length; i += 1) {
65
- if (isUppercase(text[i])) {
+ // Function name without ()
+ const functionName = text.substring(0, text.length - 2);
66
+ for (let i = 0; i < functionName.length; i += 1) {
67
+ if (isUppercase(functionName[i]) && functionName[i] !== '_') {
68
return false;
69
70
71
return true;
72
73
74
+ // @ts-ignore
75
private isCamelCase(text: string): boolean {
76
const camelCaseRegex = /^[a-z][a-zA-Z0-9]*$/;
77
return camelCaseRegex.test(text);
0 commit comments