edestecd / puppet-software

Puppet Module to install various Desktop Software
GNU General Public License v3.0
8 stars 7 forks source link

Fix or silence linter error "not in autoload module layout" #5

Open bittner opened 7 years ago

bittner commented 7 years ago

For some reason puppet-lint complains that literally all the (sub)modules are somewhat broken:

$ puppet-lint .
./manifests/social/skype.pp - ERROR: software::social::skype not in autoload module layout on line 6
./manifests/vcsscm.pp - ERROR: software::vcsscm not in autoload module layout on line 10
./manifests/virtualization.pp - ERROR: software::virtualization not in autoload module layout on line 8
./manifests/virtualization/virtualbox.pp - ERROR: software::virtualization::virtualbox not in autoload module layout on line 7
./manifests/virtualization/vagrant.pp - ERROR: software::virtualization::vagrant not in autoload module layout on line 7
./manifests/vcsscm/git.pp - ERROR: software::vcsscm::git not in autoload module layout on line 11
./manifests/vcsscm/sourcetree.pp - ERROR: software::vcsscm::sourcetree not in autoload module layout on line 6
./manifests/editors.pp - ERROR: software::editors not in autoload module layout on line 8
./manifests/browsers.pp - ERROR: software::browsers not in autoload module layout on line 8
./manifests/entertainment/vlc.pp - ERROR: software::entertainment::vlc not in autoload module layout on line 6
./manifests/webstack.pp - ERROR: software::webstack not in autoload module layout on line 10
./manifests/database.pp - ERROR: software::database not in autoload module layout on line 8
./manifests/prefpanes.pp - ERROR: software::prefpanes not in autoload module layout on line 8
./manifests/idesdk.pp - ERROR: software::idesdk not in autoload module layout on line 10
./manifests/entertainment.pp - ERROR: software::entertainment not in autoload module layout on line 11
./manifests/drivers.pp - ERROR: software::drivers not in autoload module layout on line 8
./manifests/idesdk/android_tools.pp - ERROR: software::idesdk::android_tools not in autoload module layout on line 6
./manifests/idesdk/android_studio.pp - ERROR: software::idesdk::android_studio not in autoload module layout on line 6
./manifests/social.pp - ERROR: software::social not in autoload module layout on line 8
./manifests/database/mysqlworkbench.pp - ERROR: software::database::mysqlworkbench not in autoload module layout on line 7
./manifests/database/sequelpro.pp - ERROR: software::database::sequelpro not in autoload module layout on line 6
./manifests/database/pgcommander.pp - ERROR: software::database::pgcommander not in autoload module layout on line 9
./manifests/prefpanes/launchrocket.pp - ERROR: software::prefpanes::launchrocket not in autoload module layout on line 6
./manifests/prefpanes/hosts.pp - ERROR: software::prefpanes::hosts not in autoload module layout on line 6
./manifests/storage.pp - ERROR: software::storage not in autoload module layout on line 9
./manifests/utilities.pp - ERROR: software::utilities not in autoload module layout on line 8
./manifests/editors/textwrangler.pp - ERROR: software::editors::textwrangler not in autoload module layout on line 6
./manifests/editors/atom.pp - ERROR: software::editors::atom not in autoload module layout on line 8
./manifests/editors/vim.pp - ERROR: software::editors::vim not in autoload module layout on line 5
./manifests/editors/textmate.pp - ERROR: software::editors::textmate not in autoload module layout on line 8
./manifests/webstack/anvil.pp - ERROR: software::webstack::anvil not in autoload module layout on line 6
./manifests/browsers/chrome.pp - ERROR: software::browsers::chrome not in autoload module layout on line 7
./manifests/browsers/firefox.pp - ERROR: software::browsers::firefox not in autoload module layout on line 6
./manifests/drivers/lanier_mpc5503.pp - ERROR: software::drivers::lanier_mpc5503 not in autoload module layout on line 10
./manifests/init.pp - ERROR: software not in autoload module layout on line 12
./manifests/storage/fetch.pp - ERROR: software::storage::fetch not in autoload module layout on line 6
./manifests/storage/filezilla.pp - ERROR: software::storage::filezilla not in autoload module layout on line 6
./manifests/storage/drive.pp - ERROR: software::storage::drive not in autoload module layout on line 11
./manifests/params.pp - ERROR: software::params not in autoload module layout on line 6
./manifests/utilities/iterm.pp - ERROR: software::utilities::iterm not in autoload module layout on line 6
./manifests/utilities/openconnect.pp - ERROR: software::utilities::openconnect not in autoload module layout on line 6
./manifests/utilities/alfred.pp - ERROR: software::utilities::alfred not in autoload module layout on line 10
./manifests/utilities/synaptic.pp - ERROR: software::utilities::synaptic not in autoload module layout on line 5
./manifests/utilities/controlplane.pp - ERROR: software::utilities::controlplane not in autoload module layout on line 6
./manifests/utilities/onyx.pp - ERROR: software::utilities::onyx not in autoload module layout on line 6

There's probably a sane reason for puppet-lint complaining. On the other hand the whole software module works just fine in the field out there.

Can we fix this, or silence the complaint without running risk?

bittner commented 7 years ago

Ah, the "problem" only is that the directory containing the repository is called puppet-software instead of just the module name, software. This is natural when you do a simple clone with Git.

How do other repos deal with this? In the end, it's a sensible choice to prefix a Puppet module's repo name with puppet-.

edestecd commented 7 years ago

The default rake task runs all the tests, including puppet-lint: https://github.com/edestecd/puppet-software/blob/master/Rakefile#L29

I usually just run: rake

that sets up everything. Most modules use rake tasks to run the tests with travis ci

bittner commented 7 years ago

There are some comments on your repo from a Puppet Labs employee. https://github.com/puppetlabs/pdk/issues/254#issuecomment-328801239

You may want to check that. (I'm not proficient and fluent in Ruby to be able to judge this properly.)

edestecd commented 7 years ago

@bittner OK, I was not aware of pdk. I'll check it out. This module could definitely use some love and updating. I still have yet to switch over to some puppet 4 conventions. It is compatible but puppet 4 throws some warnings. It is my intention to go through it and get it updated to the latest standards in the near future. I was going to compare to one of the puppetlabs modules as an example... I'll def have a look at making it compatable with pdk.

bittner commented 7 years ago

Don't worry! PDK has been released just recently. It's the new kid on the block.

bittner commented 6 years ago

This could likely be fixed by PR #15.