Git Product home page Git Product logo

Comments (11)

mmckinst avatar mmckinst commented on August 24, 2024 1

OK. I see the problem now. its failing when the variable has double quotes around it, even if it is correctly top scoped. The below example is failing to be found by legacy_facts-check:

notify { "Example \$::osfamily $::osfamily": }

from puppet-lint-legacy_facts-check.

mmckinst avatar mmckinst commented on August 24, 2024

It is missing it because it expects a top scope fact like $::osfamily. https://github.com/mmckinst/puppet-lint-top_scope_facts-check will fix that for you.

I'll add something to the documentation that it will only find top scope facts.

from puppet-lint-legacy_facts-check.

genebean avatar genebean commented on August 24, 2024

I'm pretty sure this is missed by that too...

Sent with GitHawk

from puppet-lint-legacy_facts-check.

mmckinst avatar mmckinst commented on August 24, 2024

Can you provide a test case where it isn't working?

$::osfamily and $osfamily are actually one of the test cases and is passing in the most recent test: https://travis-ci.org/mmckinst/puppet-lint-legacy_facts-check/jobs/492503967

from puppet-lint-legacy_facts-check.

genebean avatar genebean commented on August 24, 2024

The example from my original report was pulled directly from a manifest where detection wasn't working. I just edited the message down a hair but the interpolated part was the same. I'll look for the original text too though.

from puppet-lint-legacy_facts-check.

genebean avatar genebean commented on August 24, 2024

Any idea why the double quotes are the issue? FWIW, all interpolated facts in a string would be double quoted as that's required to make the interpolation happen.

from puppet-lint-legacy_facts-check.

mmckinst avatar mmckinst commented on August 24, 2024

How the puppet-lint works under the hood is beyond my understanding :(.

I did find a fix at #18 . Does that work on your code?

It is weird because I swear I've used this on top scope variables inside quotes, although maybe I've always used top scope variables with curly braces around them like ${::osfamily} since it works fine on them.

from puppet-lint-legacy_facts-check.

genebean avatar genebean commented on August 24, 2024

I’ll give it a try and report back

Sent with GitHawk

from puppet-lint-legacy_facts-check.

mmckinst avatar mmckinst commented on August 24, 2024

Did the fix at #18 work?

from puppet-lint-legacy_facts-check.

mmckinst avatar mmckinst commented on August 24, 2024

@genebean Did you get a chance to test the fix? It worked in the test case I came up with in the PR.

from puppet-lint-legacy_facts-check.

mmckinst avatar mmckinst commented on August 24, 2024

This should be fixed in the latest version (1.0.0) . If you're still having the problem, please reopen this issue.

from puppet-lint-legacy_facts-check.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.