Skip to content
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

Certain characters in strings suppressing legit warnings #944

Open
sanfrancrisko opened this issue May 10, 2021 · 0 comments
Open

Certain characters in strings suppressing legit warnings #944

sanfrancrisko opened this issue May 10, 2021 · 0 comments

Comments

@sanfrancrisko
Copy link

Originally reported in puppetlabs/pdk#1076

Puppet Lint Version: 2.4.2

It appears as though certain characters are causing error messages to be suppressed. Take this class:

# a.pp
class a::t {
    if $x == 1 {
        fail("½ ${x}")
        notify { "${x}": }
    }
}

If you run puppet-lint against it, you will receive the following errors:

WARNING: string containing only a variable on line 10
WARNING: fail(½ ) should be decorated but interpolation is not supported at this time. on line 9

Note: The second message (fail(½ )) is coming from puppet-lint-il8n.

However, when you replace the ½ char with a you get these expected warnings:

WARNING: top-scope variable being used without an explicit namespace on line 8
WARNING: top-scope variable being used without an explicit namespace on line 9
WARNING: top-scope variable being used without an explicit namespace on line 10
WARNING: string containing only a variable on line 10
WARNING: fail(a ) should be decorated but interpolation is not supported at this time. on line 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant