drupal-console icon indicating copy to clipboard operation
drupal-console copied to clipboard

[module generator]: Consider adding phpcs support to generated modules.

Open cosmicdreams opened this issue 4 years ago • 1 comments

Consider adding phpcs support to generated modules

Problem/Motivation

We'd like to iterate the generator for modules to better setup modules for security scans on Drupal.org.

Details to include: As a part of my company's Contrib-First development policy, we're starting to contribute of the work we're doing on projects back to the open source project. After a bit of iteration on our process of doing that, we're discovering we could benefit from some kind of generator that could create that beginnings of the module we wish to contribute back. So this is an excellent tool for that.

We're looking to improve the default state of the module to include the things we normally add:

  • phpcs support
  • A README file that starts with the name of the module.
  • Initialize the folder to be a git repo
  • add pre-commit hooks to that repo

I bet we won't be able to achieve consensus on adding all of that but I'd like to open a discussion on whether adding any of that would be well received by developers.

cosmicdreams avatar Nov 14 '19 20:11 cosmicdreams

I second the request for adding phpcs support to the generated code. It would be ideal to have a github pipeline that runs each generate command and after all code is generated run the default drupal/coder standards on the generated code. This way we can keep generated code standard compliant.

ghost avatar Sep 15 '21 08:09 ghost