shadowplay 0.16.3

Utility for checking puppet syntax, a puppet manifest linter, a pretty printer, and a utility for exploring the Hiera.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub fn is_constant<EXTRA>(s: &crate::puppet_lang::string::StringExpr<EXTRA>) -> bool {
    match &s.data {
        crate::puppet_lang::string::StringVariant::SingleQuoted(_) => true,
        crate::puppet_lang::string::StringVariant::DoubleQuoted(list) => {
            for elt in list {
                if let crate::puppet_lang::string::DoubleQuotedFragment::Expression(fragment) = elt {
                    if !crate::puppet_pp_lint::tool::expression::is_constant(&fragment.data) {
                        return false;
                    }
                }
            }
            true
        }
    }
}