#!/usr/bin/env php
<?php
/**
 * Validate that each sniff is complete, i.e. has unit tests and documentation.
 *
 * This script should be run from the root of a PHPCS standards repo and can
 * be used both on PHPCS itself as well as by external standards.
 *
 * Usage:
 *     phpcs-check-feature-completeness
 *     phpcs-check-feature-completeness [-q] [--exclude=<dir>] [directories]
 *
 * Options:
 *     directories   One or more specific directories to examine.
 *                   Defaults to the directory from which the script is run.
 *     -q, --quiet   Turn off warnings for missing documentation.
 *     --exclude     Comma-delimited list of (relative) directories to exclude
 *                   from the scan.
 *                   Defaults to excluding the /vendor/ directory.
 *     --no-progress Disable progress in console output.
 *     --colors      Enable colors in console output.
 *                   (disables auto detection of color support)
 *     --no-colors   Disable colors in console output.
 *     -v            Verbose mode.
 *     -h, --help    Print this help.
 *     -V, --version Display the current version of this script.
 *
 * @package   PHPCSDevTools
 * @copyright 2019 PHPCSDevTools Contributors
 * @license   https://opensource.org/licenses/LGPL-3.0 LGPL3
 * @link      https://github.com/PHPCSStandards/PHPCSDevTools
 */

if (is_file(__DIR__.'/../autoload.php') === true) {
    // Installed via Composer.
    require_once __DIR__.'/../autoload.php';
} else {
    // Presume git clone.
    require_once __DIR__ . '/../Scripts/FileList.php';
    require_once __DIR__ . '/../Scripts/CheckSniffCompleteness.php';
}

$validate = new PHPCSDevTools\Scripts\CheckSniffCompleteness();
$validate->validate();
