2017 © Pedro Peláez
 

library docheader

A small library to check header docs

image

malukenho/docheader

A small library to check header docs

  • Wednesday, February 7, 2018
  • by malukenho
  • Repository
  • 7 Watchers
  • 45 Stars
  • 27,069 Installations
  • PHP
  • 94 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 10 Versions
  • 11 % Grown

The README.md

DocHeader

Build Status Code Coverage Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

How much time we have wasted to change copyright years in our project? How much times we forget to update it and then we're in the middle of a new year using last year copyright dated? That's sucks!!one!!, (*2)

Put doc header check in your build and get it out of your way!, (*3)

Installing

 composer require --dev --sort-packages malukenho/docheader

Setting up

Put your header in one .docheader file in the directory that you're running the checker/fixer. It file must contain only the dockblock as you want, like following example:, (*4)

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

and then run the checker:, (*5)

./vendor/bin/docheader check src/

So, you get errors or a message saying that everything is ok!, (*6)

Docheader file

By default, the docheader search for a .docheader file on the current directory that the command is executed. But you can specify a folder or a file to be used as placeholder using the option --docheader [file-or-path], (*7)

Current year placeholder

You can also put %year% on your .docheader file to refer to the current Year, like that:, (*8)

/**
 * @copyright Copyright (c) 2005-%year% Zend Technologies USA Inc. (http://www.zend.com)
 */

Regexp assertion

If you're using >=0.1.5 version, you can use the %regexp:% placeholder to match some content., (*9)

Example:, (*10)

/**
 * @copyright Copyright (c) 20%regexp:\d{2}%-2016 Zend Technologies USA Inc. (http://www.zend.com)
 */

In this case %regexp:\d{2}% assert that it should be a number of two digits between 20 and -., (*11)

The Versions

07/02 2018

dev-master

9999999-dev https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

07/02 2018

dev-enhancement/add-psalm

dev-enhancement/add-psalm https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

18/12 2017

0.1.7

0.1.7.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

03/05 2017

0.1.6

0.1.6.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

17/11 2016

0.1.5

0.1.5.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

04/10 2016

0.1.4

0.1.4.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

02/09 2016

0.1.3

0.1.3.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

31/08 2016

0.1.2

0.1.2.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

07/06 2016

0.1.1

0.1.1.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard

24/05 2016

0.1.0

0.1.0.0 https://github.com/malukenho/docheader

A small library to check header docs

  Sources   Download

MIT

The Requires

 

The Development Requires

license code style code standard