Variable prefixes don't seem to work
mokyen opened this issue · 0 comments
mokyen commented
I'm not sure why this line exists in VariableNameRule.evaluate:
pattern_str = pattern_str[0] + scope_prefix + datatype_prefix + pattern_str[1:]
https://github.com/nithinn/ncc/blob/master/ncc.py#L181
When I use the following regex: 'MATCHER_P.|[a-z][a-z0-9]([A-Z][a-z0-9])'
this line creates the following regex: 'Mg_ATCHER_P.|[a-z][a-z0-9]([A-Z][a-z0-9])'
I'm not clear why you'd want the first character in the user-defined style file.
It feels like this would be preferred unless I'm just misunderstanding.
pattern_str = scope_prefix + datatype_prefix + pattern_str