emschu opened a new pull request #40:
URL: https://github.com/apache/skywalking-eyes/pull/40


   This is a preview to add support for PHP header comments with minimal code 
changes. I'm not sure if it is a good idea to change the `CommentStyle` struct 
this way by adding two new properties `ensure_after` or `ensure_before`. 
   
   My idea is composing the header license text by *ensure_after* + *header* + 
*ensure_before* - if the RegEx provided in `after` yields no results.
   Are there other (script) languages which require a similar behaviour?
   
   What do you think about this? Or do you want to discuss this in a dedicated 
issue?
   
   Some notes:
   - `declare(strict_types=[0|1]);` has to be omitted or it has to be the very 
first statement in the script, which is pretty common in modern PHP code.
   - empty php files are considered
   - PHP can be configured to use a short-tag syntax by enabling 
`short_open_tag` in `php.ini`.  `<?php` then can be written as `<?`, but even 
with `short_open_tag`s set to `On` `<?php` is still a valid start of a PHP code 
block.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to