-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support underscores in class and definitions names in puppetParser #1904
Conversation
… name Close universal-ctags#1901. I refereed https://puppet.com/docs/puppet/6.0/lang_data_string.html#bare-words for fixing this. I also add a hyphen char to the list of acceptable chars.
fixes universal-ctags#1901 According to puppet docs: https://puppet.com/docs/puppet/5.3/lang_reserved.html#classes-and-defined-resource-types calss or a definition name can contain an underscore anywhere except the first char. Also added tests. A minor name change for a test directory
/tmp/multipledefineo_netw_o input.pp /^ file { "\/tmp\/multipledefineo_netw_o": content => "two" }$/;" resource line:16 language:PuppetManifest scope:definition:o_ne::tw_o end:16 | ||
o_ne::two_ input.pp /^define o_ne::two_ {$/;" definition line:19 language:PuppetManifest end:21 | ||
/tmp/multipledefineo_netwo_ input.pp /^ file { "\/tmp\/multipledefineo_netwo_": content => "two" }$/;" resource line:20 language:PuppetManifest scope:definition:o_ne::two_ end:20 | ||
t input.pp /^t { 't': }$/;" resource line:23 language:PuppetManifest end:23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably another bug's indication.
In the source file 5 different resources have been declared.
t { 't': }
one_ { 'one_': }
on_e { 'on_e': }
o_ne::tw_o { 'o_ne::tw_o': }
o_ne::two_ { 'o_ne::two_': }
But this tag file only mentions one of them.
I suspect there is another regular expression somewhere missing the "_" char.
@masatake if you point me to the right direction I can also fix that in another PR.
Both of the new input.pp files are OK puppet syntax:
and:
|
@masatake Could you take a look at this at your convenience please ? |
I got following output for the input
wiith following change:
|
By the way, it is a really bad idea using |
Could you put "PuppetManifest:" as the prefix for the commit logs? |
You are right. I will not use ahakanbaba:master again. |
No description provided.