Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR brings in a few minor changes/additions to the
StrictModuleLayout
check. These additions are motivated by the real usage in the project of my client (which is where the original implementation of this check was done).Note that these changes weren't discussed in any issue so far. However, to better understand the issues, I experimented with a fix, and so I ended up with the solution here, and then I figured I may as well submit it :-) That said, I'm not insisting on these changes, and so if you have some other ideas feel free to propose them.
Anyway, here are the changes:
callback_impl
. In other words, with this change we can't enforce that e.g. callback macros must preceed callback functions. The reason is because a single module could implement multiple behaviours, and then such order becomes counterproductive, because we typically want to group callbacks by the module (e.g. first all callbacks ofFoo
, then all callbacks ofBar
).:ignore
option which allows us to ignore some module parts (i.e. allow some parts to appear anywhere in the module). For my client's projects, the concrete example would be private macros.