silverleague / silverstripe-ideannotator

Generate docblocks for DataObjects, Page, PageControllers and (Data)Extensions
BSD 3-Clause "New" or "Revised" License
46 stars 25 forks source link

[idea] Add @author @package #7

Closed Firesphere closed 9 years ago

Firesphere commented 9 years ago

Have a config-setting, that will auto-add the @author and @package doc as well.

for example:

DataObjectAnnotator:
  author: Firesphere
  package: awesome/package
axyr commented 9 years ago

Hm, then we need an extra identifier for each module right? Since the last one will be used in config.. Does the ide actually does something with this info?

Firesphere commented 9 years ago

@author is useful to identify who made it., @package... yeah, that might be tricky

Zauberfisch commented 9 years ago

I always add @author, and having this created automatically in general is good idea.

Though I am not sure if this module even needs to do it, many IDEs allow you to define the default docblock, so you can simply define that there.

EDIT: oh, I just realized this would require #3 to be fixed first

Also, if we include @author, it should not be configurable by yml, because this would not work for teams. It would require to be some sort of environmental variable (eg defined in _ss_environment.php) to be able to define a specific author per developer.

axyr commented 9 years ago

Im not conviced to put this in de module. The module is created to have a convenient way of generation annotations for autocompletion in IDE's, that currently requires a lot of handwriting without this module.

Generating @author can be done with most editors as a one time config for all files created ..

I think this is a unnecessary addition that does not fix that can't be done maybe easier...

Firesphere commented 9 years ago

Agreed with @axyr on this. It would be nice, but it's making things eixtremely complicated, something this module isn't trying to achieve :)

axyr commented 9 years ago

agreed and closed :)