Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Added new config option report_format to change the default report fr…
Browse files Browse the repository at this point in the history
…omat from FULL to something else (e.g., SUMMARY, XML, CSV)

git-svn-id: http://svn.php.net/repository/pear/packages/PHP_CodeSniffer/trunk@247272 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
gsherwood committed Nov 28, 2007
1 parent 0d34cdf commit a0e06e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
-- This allows you to use the existing sniffs that check for spaces even when you use tabs
-- Can also be set via a config var: phpcs --config-set tab_width 4
-- A value of zero (the default) tells PHP_CodeSniffer not to replace tabs with spaces
- You can now change the default report format from "full" to something else
-- Run: phpcs --config-set report_format [format]
- Improved performance by optimising the way the scope map is created during tokenising
- Fixed incorrect errors being thrown for nested switches in Squiz SwitchDeclarationSniff
- PEAR FunctionCommentSniff no longer complains about missing comments for @throws tags
Expand Down
6 changes: 5 additions & 1 deletion scripts/phpcs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@ $files = array();
$standard = null;
$verbosity = 0;
$local = false;
$report = 'full';
$extensions = array();
$ignored = array();
$generator = '';

$report = PHP_CodeSniffer::getConfigData('report_format');
if ($report === null) {
$report = 'full';
}

$showWarnings = PHP_CodeSniffer::getConfigData('show_warnings');
if ($showWarnings === null) {
$showWarnings = true;
Expand Down

0 comments on commit a0e06e7

Please sign in to comment.