Comments (11)
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.
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.
I'm pretty sure this is missed by that too...
Sent with GitHawk
from puppet-lint-legacy_facts-check.
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.
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.
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.
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.
I’ll give it a try and report back
Sent with GitHawk
from puppet-lint-legacy_facts-check.
Did the fix at #18 work?
from puppet-lint-legacy_facts-check.
@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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-lint-legacy_facts-check.