panlint: Add check for features being included from outside their tree#261
panlint: Add check for features being included from outside their tree#261jrha merged 1 commit intoquattor:mainfrom
Conversation
ned21
left a comment
There was a problem hiding this comment.
What the goal here? To enforce a rigid hierarchy? That seems a bit too opinionated and is not how we structure our templates, nor can I really think of any good reasons you would want to enforce that.
|
+1. I fully support @ned21 remark. In the template library we maintain, like the grid ou cloud ones (not to speak of our local templates), we have cases where a feature depends on other features. I don't see any reason to forbid it. If you'd like |
|
Fair enough, I'll make it optional. We enforce a two layer hierarchy at RAL which was originally based on discussions with @gombasg I think, where the only includes that are permitted are:
|
ac1c684 to
371c16c
Compare
887e564 to
22e0ff7
Compare
bc5e940 to
338a8ac
Compare
There was a problem hiding this comment.
Can you make this optional and off by default please? We don't require this, and in fact actively encourage contrary behaviour because our feature namespace is a mirror of the namespace used by other artefact repositories. Our general policy is that features should be "complete": therefore if a feature depends on another, you MUST include that feature in your feature, and this would break that.
As someone who like a clean and tidy code base, I can appreciate the desire for structure but we find git grep works extremely well within our "monorepo" of templates.
|
It is optional and off by default. |
i.e. they do not include templates from feature paths outside their tree Whether this is desirable or not is down to site policy, so this is optional and disabled by default.
338a8ac to
5932acc
Compare
|
I have amended the commit message to clarify this. |
ned21
left a comment
There was a problem hiding this comment.
Apologies, I missed that! action=store_true tricked my brain into thinking the default was on.
i.e. one feature including a template from another