Problem/Motivation
Currently, Drupal Surge only provides static coding standards without the ability for community members to contribute their own guidelines. Package authors and project teams cannot easily share their best practices, limiting the tool's usefulness for collaborative development.
Imagine for example all the work done in the Group module, or specific DDEV related commands and instructions.
We could add that, but it will eat up valuable tokens whilst not everybody works with DDEV or uses Group.
Proposed resolution
Implement an automatic community guidelines detection and merging system that:
- Scans for surge-guidelines/ directories throughout the project structure
- Automatically merges community guidelines with base standards
- Integrates with existing standards command for seamless workflow
- Make it transparent what guidelines are being added, so we don't inject guidelines unknowingly
-- Ignore vendor folders for that matter
Remaining steps
- Determine what the directory name would be to scan for, right now we use surge-guidelines, which is very specific so should not be in the way of any other implementations.
Comments
Comment #3
ronaldtebrake commentedIt's done.
If you add markdown files to your custom module / project, in a
surge-guidelinesdirectory it should be merged if you runcomposer surge-standards.We currently also have
composer surge-scanwhich allows you to dry run this, it will create adrupal-surge-standards-with-community.mdfile merging all of the community guidelines/standards with the default drupal one.Comment #4
ronaldtebrake commented