简体   繁体   English

声纳命名约定问题

[英]Sonar naming convention issues

Following is the error: 以下是错误:

Rename this 'AppHeaderController' function to match the regular expression ^[a-z|$][a-zA-Z0-9]*$  

There is nothing wrong in the naming as seen, still the error is seen. 所看到的命名没有错,仍然看到了错误。 How to fix this? 如何解决这个问题?

This rule raises error when name used for function declaration doesn't comply with some pattern. 当用于函数声明的名称不符合某些模式时,此规则将引发错误。 So if it's usual for you to create "constructor" functions (thus they start from capital letter), you should probably change the default regular expression, eg ^[a-zA-Z0-9]+$ . 因此,如果通常创建“构造函数”函数(因此它们从大写字母开始),则可能应更改默认正则表达式,例如^[a-zA-Z0-9]+$

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM