Giter Site home page Giter Site logo

puppet-lint-alias-check's Introduction

puppet-lint-alias-check

Build Status Gem Version Gem Downloads Coverage Status Gemnasium

A puppet-lint plugin to check for the alias parameter in resources.

Installing

From the command line

$ gem install puppet-lint-alias-check

In a Gemfile

gem 'puppet-lint-alias-check', :require => false

Checks

Alias parameter used

The alias parameter should not be used most of the time. In Puppet 4, resources cannot be accessed using the alias parameter, making it quite useless.

A proper use of the namevar with static titles is better practice.

What you have done

package { $foo::params::pkg:
  ensure => package,
  alias  => 'foo',
}

What you should have done

package { 'foo':
  ensure => package,
  name   => $foo::params::pkg,
}

Disabling the check

To disable this check, you can add --no-alias-check to your puppet-lint command line.

$ puppet-lint --no-alias-check path/to/file.pp

Alternatively, if you’re calling puppet-lint via the Rake task, you should insert the following line to your Rakefile.

PuppetLint.configuration.send('disable_alias')

puppet-lint-alias-check's People

Contributors

raphink avatar mcanevet avatar

Watchers

Jesse Eichar avatar Mathieu Bornoz avatar Christian Kaenzig avatar Stéphane Brunner avatar Vincent Renaville avatar Pierre Mauduit avatar James Cloos avatar Jeremy Barascut avatar Maurer Luc avatar  avatar  avatar

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.