-
Notifications
You must be signed in to change notification settings - Fork 1
OS2FORMS-380 #134
OS2FORMS-380 #134
Conversation
rimi-itk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Some comments on coding standards tools added.
| composer require dealerdirect/phpcodesniffer-composer-installer --no-interaction | ||
| composer require drupal/coder --no-interaction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add these to require-dev in composer.json to make it easy to run the checks locally before committing code.
We could also borrow from https://github.com/itk-dev/os2forms_selvbetjening/blob/develop/composer.json#L92-L95 (to also include static code analysis if we dare) and add some helper scripts to make it even easier to run the checks: https://github.com/itk-dev/os2forms_selvbetjening/blob/develop/composer.json#L197-L224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rimi-itk thank you for feedback :)
I've added dealerdirect/phpcodesniffer-composer-installer and drupal/coder to as dev dependencies.
Including static code, analysis requires establishing Drupal project structure and injecting the subject repository into it.
IMO it makes more sense to have it on installation like https://github.com/itk-dev/os2forms_selvbetjening
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, running code analysis on a Drupal module in a repository is tricky, @andriyun, but it can be done.
We have done it in https://github.com/itk-dev/azure_ad_delta_sync/blob/develop/.github/workflows/pr.yaml#L95-L113, but let's get back to that later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to go with the approach you proposed. It looks like it's not so easy for this case.
This kind of check was not part of this task in the beginning. So I'd rather move it out of scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. We should just stick with coding standards for now.
31ec56c to
06d9dec
Compare
rimi-itk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply coding standards.
065ae7a to
dd57e53
Compare
Do you mean fix warnings and errors in PHP code sniffer report? |
|
Yes, @andriyun, all checks should succeed in this merge request. Otherwise the checks don't add any value. |
4eac31d to
0b239ab
Compare
0b239ab to
132d14d
Compare
|
@rimi-itk I've fixed coding standards issues |
|
Excellent work, @andriyun! |
Part of https://os2web.atlassian.net/browse/OS2FORMS-380