All classes and resource type definitions must be in separate files in the manifests directory of their module. This is functionally identical to declaring all classes and defines in init.pp, but highlights the structure of the module and makes everything more legible (style guide).
Additionally, the files should be named appropriately for the class or defined
type they contain. class foo should be in foo/manifests/init.pp, class
foo::bar should be in foo/manifests/bar.pp and so on. You can read more
about the filesystem layout for modules in the module fundamentals
documentation.
To disable this check you can add --no-autoloader_layout-check to your
puppet-lint command line.
$ puppet-lint --no-autoloader_layout-check path/to/file.ppAlternatively, if you’re calling puppet-lint via the Rake task, you should
insert the following line to your Rakefile.
PuppetLint.configuration.send('disable_autoloader_layout')