google_forms/setup_phpcs.php

23 lines
668 B
PHP

<?php
// Include PHP_CodeSniffer
require_once 'vendor/squizlabs/php_codesniffer/autoload.php';
// Manually include the custom sniff file
require_once '/var/www/html/google_forms/custom_sniffs/Sniffs/NamespaceSniff.php';
// Create a new PHP_CodeSniffer configuration object
use PHP_CodeSniffer\Runner;
use PHP_CodeSniffer\Config;
// Create a new configuration object and specify the standard
$config = new Config();
$config->standard = '/var/www/html/google_forms/ruleset.xml'; // Path to your ruleset.xml
// Create a new PHP_CodeSniffer runner
$runner = new Runner();
$runner->config = $config;
// Run PHP_CodeSniffer with the specified standard
$runner->run();