-
Notifications
You must be signed in to change notification settings - Fork 620
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
PuppetManifest parser does not recognize definitions if the name contains underscore. #1901
Comments
The example is very similar to the already existing test case about fully qualified defines here . If you put an underscore anywhere in the name ( |
It looks like @masatake has spent a lot of time on the puppetParser. ^ FYI. |
Can we use underscore char as the first character of a name? |
The line in optlib/puppetManifest.ctags:
is wrong.
or
. |
… 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.
Good question. I think only lowercase letters are allowed as the first character.
The text at the docs also point this out.
|
How about hyphen? |
Himm, I do not think
If a "bare-word" were acceptable, I think the documentation at least would mention "bare-word" I tried running puppet-lint as well For the input.pp with a hyphen:
Prints an error about the hyphen in the name:
Without the hypen charater:
Prints only one error :
|
Saw this totally by accident, I worked on the puppet parser a couple years ago for the summer. Unfortunately I can't remember any details about the language, but I believe that Heinrich Lindberg maintains the current puppet parser and should have definitive answers to any puppet parser related questions: |
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
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 fixes universal-ctags#1901
The name of the parser: puppetManifest
The command line you used to run ctags:
The content of input file: example.pp
The tags output you are not satisfied with:
empty output.
The tags output you expect:
The version of ctags:
How do you get ctags binary:
Build it locally. At this commit.
Following the instructions from here
On a centos7 machine
The text was updated successfully, but these errors were encountered: