feat: PRSDM-10268 enforce imports#291
Merged
christopherbrunsdon merged 4 commits intodevelopfrom Apr 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a Hugo config validation step to enforce deterministic Hugo module import ordering (styling base before layouts base), along with supporting config parsing and tests.
Changes:
- Add
validateModuleImportOrderto the Hugo service and run it before invoking Hugo. - Introduce
configtranslation.ReadHugoConfigto parse Hugo YAML config intoHugoConfig. - Add unit tests for module import ordering validation and update README build/test prerequisites (submodules).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| pkg/domain/service/hugo/hugo.go | Adds config discovery and import-order validation prior to running Hugo. |
| pkg/domain/service/hugo/hugo_test.go | Adds unit tests for the new import-order validation behavior. |
| pkg/configtranslation/configfile.go | Adds a ReadHugoConfig helper to read/unmarshal Hugo config YAML. |
| README.md | Documents initializing git submodules before building/testing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Zalaras
approved these changes
Apr 28, 2026
Contributor
Zalaras
left a comment
There was a problem hiding this comment.
LGTM, not tested locally
Quantumplate
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Enforce imports in the correct order
How to Test
Build the package
In a Presidium module, set the order in reverse
Run
presidium hugoagainst this module (reference the absolute path from your module)Correct the order: base before layouts
Run
presidium hugoagainst this moduleTicket
https://spandigital.atlassian.net/browse/PRSDM-9466