in Blog

Running Puppet-Lint in Intellij IDEA

I have recently begun editing Puppet modules, Hiera configuration files, Bash and Python scripts with Intellij IDEA. To prevent unstable build due to puppet-lint errors I have configured the IDE to run puppet-lint as follows.

  1. Install puppet-lint for your user account:
    gem install puppet-lint
  2. Add puppet-lint as an external tool in Intellij IDEA
    External Tool: Puppet-Lint
  3. Add a keyboard short-cut for the external tool
    External Tool Shortcut

Now, everytime you want to make sure the file is okay according to puppet-lint, press CTRL+SHIFT+ALT+L.

For bonus points, you could probably also set up an automatic run of puppet-lint with every save. See section 3 and 4 in this blog post for inspiration.