contao-community-alliance/build-system-tool-author-validation

此包已被弃用,不再维护。作者建议使用 phpcq/author-validation 包。

检查特定文件的作者是否在版权头部被提及。

1.2.1 2014-12-15 19:10 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:42:19 UTC


README

Version Stable Build Status Upstream Build Status License Downloads

验证PHP文件、composer.json、bower.json或packages.json中的作者信息。

这有助于确保在所有PHP文件、composer.jsonbower.jsonpackages.json中提到的所有作者(来自git历史)。

使用方法

将以下内容添加到composer.jsonrequire-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"