Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
-
Coremunity
-
Coremunity Hopper
-
Needs Assessment
-
Needs Assessment
Description
As part of the work for PUP-4242, validation was introduced to check that the name of a definition (class, define, function, type, plan) matches the path to the file it's in. That code works by searching up the ancestry until it finds a directory named one of manifests, functions, types, or plans, and assuming the parent of that directory must be the module.
That works fine, so long as there isn't a nested directory with one of those names. In that case, the manifest fails validation because its name (though correct) doesn't match what was expected (incorrect).
For example:
# modulename/manifests/foo/bar/types/baz.pp
|
class modulename::foo::bar::types::baz() { }
|
This manifest has the correct name, but the validation thinks the module name is bar and that the path to the file is bar/types/baz.pp. Thus, it believes the correct name for the entity defined in the manifest ought to be bar::baz, causing an error.
Attachments
Issue Links
- duplicates
-
PUP-4242 Add errors for manifests declaring things in wrong namespace
-
- Closed
-