contao-community-alliance / build-system-tool-author-validation
1.2.1
2014-12-15 19:10 UTC
Requires
- php: >=5.3.4
- contao-community-alliance/build-system-repository-git: ~1.0
- phpspec/php-diff: ~1.0
- symfony/console: ~2.3
- symfony/finder: ~2.3
Requires (Dev)
This package is not auto-updated.
Last update: 2022-02-01 12:42:19 UTC
README
验证PHP文件、composer.json、bower.json或packages.json中的作者信息。
这有助于确保在所有PHP文件、composer.json
、bower.json
和packages.json
中提到的所有作者(来自git历史)。
使用方法
将以下内容添加到composer.json
的require-dev
部分
"contao-community-alliance/build-system-tool-author-validation": "~1.0"
调用二进制文件
./vendor/bin/check-author.php
可选地传递要检查的路径
./vendor/bin/check-author.php /path/to/some/repository/also/with/subdir
配置
可选地,您可以传递一个配置文件路径(默认为.check-author.yml),该文件将被使用。
# Example .check-author.yml
# Map multiple authors to a single one (aliasing of contributors).
mapping:
# original: alias
"John Doe <john@example.org>": "John Doe <jd@example.org>"
# or original: [multiple aliases]
"John Doe <john@example.org>": ["John Doe <jd@example.org>", "Acme Inc <info@example.org>"]
# or
"John Doe <john@example.org>":
- "John Doe <jd@example.org>"
- "Acme Inc <info@example.org>"
# Ignore commits from these authors (equivalent to cmd line parameter --ignore=...)
ignore:
- Build Bot <bot@example.org>
# If present, scan only these and not the whole base dir (equivalent to cmd line arguments).
# Values must either be absolute paths or relative to the current directory.
include:
- src
# Paths to exclude from scanning (equivalent to cmd line parameter --exclude=...)
exclude:
- Foo.php
- /tests/*
- */languages
# Enforce copy-left author for certain files.
copy-left:
"John Doe <jd@example.org>": "/library"
# or
"John Doe <jd@example.org>": ["/library", "File.php"]
# or
"John Doe <jd@example.org>":
- "File.php"