letterm=matchstr(a:item['text'],'\m\C^Avoid \(variables with short\|excessively long variable\) names like \S\+\.')
ifterm!=# ''
return'\V'.substitute(term,'\m\C^Avoid \(variables with short\|excessively long variable\) names like \(\S\+\)\..*','\2','')
endif
letterm=matchstr(a:item['text'],'\m\C^Avoid using short method names like \S\+::\S\+()\.')
ifterm!=# ''
return'\V'.substitute(term,'\m\C^Avoid using short method names like \S\+::\(\S\+\)()\..*','\1','')
endif
letterm=matchstr(a:item['text'],'\m\C^\S\+ accesses the super-global variable ')
ifterm!=# ''
return'\V'.substitute(term,'\m\C accesses the super-global variable .*$','','')
endif
letterm=matchstr(a:item['text'],'\m\C^Constant \S\+ should be defined in uppercase')
ifterm!=# ''
return'\V'.substitute(term,'\m\C^Constant \(\S\+\) should be defined in uppercase','\1','')
endif
letterm=matchstr(a:item['text'],"\\m\\C^The '\\S\\+()' method which returns ")
ifterm!=# ''
return'\V'.substitute(term,"\\m\\C^The '\\(\\S\\+\\)()' method which returns.*",'\1','')
endif
letterm=matchstr(a:item['text'],'\m\C variable \S\+ should begin with ')
ifterm!=# ''
return'\V'.substitute(term,'\m\C.* variable \(\S\+\) should begin with .*','\1','')
endif
letterm=matchstr(a:item['text'],"\\m\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\S\\+'")
ifterm!=# ''
return'\V'.substitute(term,"\\m\\C^Avoid unused \\(private fields\\|local variables\\|private methods\\|parameters\\) such as '\\(\\S\\+\\)'.*",'\2','')