| » Version | » Information |
|---|---|
| 1.2.0RC2 |
Release date: 2009-05-25 07:28 UTC Release state: beta Changelog: - Test suite can now be run using the full path to AllTests.php (feature request #16179) - Fixed bug #15980 : PHP_CodeSniffer change php current directory -- Thanks to Dolly Aswin Harahap for the patch - Fixed bug #16001 : Notice triggered - Fixed bug #16054 : phpcs-svn-pre-commit not showing any errors - Fixed bug #16071 : Fatal error: Uncaught PHP_CodeSniffer_Exception - Fixed bug #16170 : Undefined Offset -1 in MultiLineConditionSniff.php on line 68 - Fixed bug #16175 : Bug in Squiz-IncrementDecrementUsageSniff Dependencies:
|
| 1.2.0RC1 |
Release date: 2009-03-09 03:40 UTC Release state: beta Changelog: - Reports that are output to a file now include a trailing newline at the end of the file - Fixed sniff names not shown in -vvv token processing output - Added Generic SubversionPropertiesSniff to check that specific svn props are set for files -- Thanks to Jack Bates for the contribution - The PHP version check can now be overridden in classes that extend PEAR FileCommentSniff -- Thanks to Helgi Þormar Þorbjörnsson for the suggestion - Added Generic ConstructorNameSniff to check for PHP4 constructor name usage -- Thanks to Leif Wickland for the contribution - Squiz standard now supports multi-line function and condition sniffs from PEAR standard - Squiz standard now uses Generic ConstructorNameSniff - Added MySource GetRequestDataSniff to ensure REQUEST, GET and POST are not accessed directly - Squiz OperatorBracketSniff now allows square brackets in simple unbracketed operations - Fixed the incorrect tokenizing of multi-line block comments in CSS files - Fixed bug #15383 : Uncaught PHP_CodeSniffer_Exception - Fixed bug #15408 : An unexpected exception has been caught: Undefined offset: 2 - Fixed bug #15519 : Uncaught PHP_CodeSniffer_Exception - Fixed bug #15624 : Pre-commit hook fails with PHP errors - Fixed bug #15661 : Uncaught PHP_CodeSniffer_Exception - Fixed bug #15722 : "declare(encoding = 'utf-8');" leads to "Missing file doc comment" - Fixed bug #15910 : Object operator indention not calculated correctly Dependencies:
|
| 1.2.0a1 |
Release date: 2008-12-18 00:06 UTC Release state: alpha Changelog: - PHP_CodeSniffer now has a CSS tokenizer for checking CSS files - Added support for a new multi-file sniff that sniffs all processed files at once - Added new output format --report=emacs to output errors using the emacs standard compile output format -- Thanks to Len Trigg for the contribution - Reports can now be written to a file using the --report-file command line argument (feature request #14953) -- The report is also written to screen when using this argument - The CheckStyle, CSV and XML reports now include a source for each error and warning (feature request #13242) -- A new report type --report=source can be used to show you the most common errors in your files - Added new command line argument -s to show error sources in all reports - Added new command line argument --sniffs to specify a list of sniffs to restrict checking to -- Uses the sniff source codes that are optionally displayed in reports - Changed the max width of error lines from 80 to 79 chars to stop blank lines in the default windows cmd window - PHP_CodeSniffer now has a token for an asperand (@ symbol) so sniffs can listen for them -- Thanks to Andy Brockhurst for the patch - Added Generic DuplicateClassNameSniff that will warn if the same class name is used in multiple files -- Not currently used by any standard; more of a multi-file sniff sample than anything useful - Added Generic NoSilencedErrorsSniff that warns if PHP errors are being silenced using the @ symbol -- Thanks to Andy Brockhurst for the contribution - Added Generic UnnecessaryStringConcatSniff that checks for two strings being concatenated - Added PEAR FunctionDeclarationSniff to enforce the new multi-line function declaration PEAR standard - Added PEAR MultiLineAssignmentSniff to enforce the correct indentation of multi-line assignments - Added PEAR MultiLineConditionSniff to enforce the new multi-line condition PEAR standard - Added PEAR ObjectOperatorIndentSniff to enforce the new chained function call PEAR standard - Added MySource DisallowSelfActionSniff to ban the use of self::method() calls in Action classes - Added MySource DebugCodeSniff to ban the use of Debug::method() calls - Added MySource CreateWidgetTypeCallback sniff to check callback usage in widget type create methods - Added Squiz DisallowObjectStringIndexSniff that forces object dot notation in JavaScript files -- Thanks to Sertan Danis for the contribution - Added Squiz DiscouragedFunctionsSniff to warn when using debug functions - Added Squiz PropertyLabelSniff to check whitespace around colons in JS property and label declarations - Added Squiz DuplicatePropertySniff to check for duplicate property names in JS classes - Added Squiz ColonSpacingSniff to check for spacing around colons in CSS style definitions - Added Squiz SemicolonSpacingSniff to check for spacing around semicolons in CSS style definitions - Added Squiz IdentationSniff to check for correct indentation of CSS files - Added Squiz ColourDefinitionSniff to check that CSS colours are defined in uppercase and using shorthand - Added Squiz EmptyStyleDefinitionSniff to check for CSS style definitions without content - Added Squiz EmptyClassDefinitionSniff to check for CSS class definitions without content - Added Squiz ClassDefinitionOpeningBraceSpaceSniff to check for spaces around opening brace of CSS class definitions - Added Squiz ClassDefinitionClosingBraceSpaceSniff to check for a single blank line after CSS class definitions - Added Squiz ClassDefinitionNameSpacingSniff to check for a blank lines inside CSS class definition names - Added Squiz DisallowMultipleStyleDefinitionsSniff to check for multiple style definitions on a single line - Added Squiz DuplicateClassDefinitionSniff to check for duplicate CSS class blocks that can be merged - Added Squiz ForbiddenStylesSniff to check for usage of browser specific styles - Added Squiz OpacitySniff to check for incorrect opacity values in CSS - Added Squiz LowercaseStyleDefinitionSniff to check for styles that are not defined in lowercase - Added Squiz MissingColonSniff to check for style definitions where the colon has been forgotten - Added Squiz MultiLineFunctionDeclarationSniff to check that multi-line declarations contain one param per line - Added Squiz JSLintSniff to check for JS errors using the jslint.js script through Rhino -- Set jslint path using phpcs --config-set jslint_path /path/to/jslint.js -- Set rhino path using phpcs --config-set rhino_path /path/to/rhino - Added Generic TodoSniff that warns about comments that contain the word TODO - Removed MultipleStatementAlignmentSniff from the PEAR standard as alignment is now optional - Generic ForbiddenFunctionsSniff now has protected member var to specify if it should use errors or warnings - Generic MultipleStatementAlignmentSniff now has correct error message if assignment is on a new line - Generic MultipleStatementAlignmentSniff now has protected member var to allow it to ignore multi-line assignments - Generic LineEndingsSniff now supports checking of JS files - Generic LineEndingsSniff now supports checking of CSS files - Generic DisallowTabIndentSniff now supports checking of CSS files - Squiz DoubleQuoteUsageSniff now bans the use of variables in double quoted strings in favour of concatenation - Squiz SuperfluousWhitespaceSniff now supports checking of JS files - Squiz SuperfluousWhitespaceSniff now supports checking of CSS files - Squiz DisallowInlineIfSniff now supports checking of JS files - Squiz SemicolonSpacingSniff now supports checking of JS files - Squiz PostStatementCommentSniff now supports checking of JS files - Squiz FunctionOpeningBraceSpacingSniff now supports checking of JS files - Squiz FunctionClosingBraceSpacingSniff now supports checking of JS files -- Empty JS functions must have their opening and closing braces next to each other - Squiz ControlStructureSpacingSniff now supports checking of JS files - Squiz LongConditionClosingCommentSniff now supports checking of JS files - Squiz OperatorSpacingSniff now supports checking of JS files - Squiz SwitchDeclarationSniff now supports checking of JS files - Squiz CommentedOutCodeSniff now supports checking of CSS files - Squiz DisallowSizeFunctionsInLoopsSniff now supports checking of JS files for the use of object.length - Squiz DisallowSizeFunctionsInLoopsSniff no longer complains about size functions outside of the FOR condition - Squiz ControlStructureSpacingSniff now bans blank lines at the end of a control structure - Squiz ForLoopDeclarationSniff no longer throws errors for JS FOR loops without semicolons - Squiz MultipleStatementAlignmentSniff no longer throws errors if a statement would take more than 8 spaces to align - Squiz standard now uses Genric TodoSniff - Squiz standard now uses Genric UnnecessaryStringConcatSniff - Squiz standard now uses PEAR MultiLineAssignmentSniff - Squiz standard now uses PEAR MultiLineConditionSniff - Zend standard now uses OpeningFunctionBraceBsdAllmanSniff (feature request #14647) - MySource JoinStringsSniff now bans the use of inline array joins and suggests the + operator - Fixed incorrect errors that can be generated from abstract scope sniffs when moving to a new file - Core tokenizer now matches orphaned curly braces in the same way as square brackets - Whitespace tokens at the end of JS files are now added to the token stack - JavaScript tokenizer now identifies properties and labels as new token types - JavaScript tokenizer now identifies object definitions as a new token type and matches curly braces for them - JavaScript tokenizer now identifies DIV_EQUAL and MUL_EQUAL tokens - Improved regular expression detection in the JavaScript tokenizer - Improve AbstractPatternSniff support so it can listen for any token type, not just weighted tokens - Fixed Squiz DoubleQuoteUsageSniff so it works correctly with short_open_tag=Off - Fixed bug #14409 : Output of warnings to log file - Fixed bug #14520 : Notice: Undefined offset: 1 in /usr/share/php/PHP/CodeSniffer/File.php on line - Fixed bug #14637 : Call to processUnknownArguments() misses second parameter $pos -- Thanks to Peter Buri for the patch - Fixed bug #14889 : Lack of clarity: licence or license - Fixed bug #15008 : Nested Parentheses in Control Structure Sniffs - Fixed bug #15091 : pre-commit hook attempts to sniff folders -- Thanks to Bruce Weirdan for the patch - Fixed bug #15124 : AbstractParser.php uses deprecated split() function -- Thanks to Sebastian Bergmann for the patch - Fixed bug #15188 : PHPCS vs HEREDOC strings - Fixed bug #15231 : Notice: Uninitialized string offset: 0 in FileCommentSniff.php on line 555 - Fixed bug #15336 : Notice: Undefined offset: 2 in /usr/share/php/PHP/CodeSniffer/File.php on line Dependencies:
|
| 1.1.0 |
Release date: 2008-07-14 00:04 UTC Release state: stable Changelog: - PEAR FileCommentSniff now allows tag orders to be overridden in child classes -- Thanks to Jeff Hodsdon for the patch - Added Generic DisallowMultipleStatementsSniff to ensure there is only one statement per line - Squiz standard now uses DisallowMultipleStatementsSniff - Fixed error in Zend ValidVariableNameSniff when checking vars in form: $class->{$var} - Fixed bug #14077 : Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not a class member - Fixed bug #14168 : Global Function -> Static Method and __autoload() - Fixed bug #14238 :Line length not checket at last line of a file - Fixed bug #14249 : wrong detection of scope_opener - Fixed bug #14250 : ArrayDeclarationSniff emit warnings at malformed array - Fixed bug #14251 : --extensions option doesn't work Dependencies:
|
| 1.1.0RC3 |
Release date: 2008-07-03 01:28 UTC Release state: beta Changelog: - PEAR FileCommentSniff now allows tag orders to be overridden in child classes -- Thanks to Jeff Hodsdon for the patch - Added Generic DisallowMultipleStatementsSniff to ensure there is only one statement per line - Squiz standard now uses DisallowMultipleStatementsSniff - Fixed error in Zend ValidVariableNameSniff when checking vars in form: $class->{$var} - Fixed bug #14077 : Fatal error: Uncaught PHP_CodeSniffer_Exception: $stackPtr is not a class member - Fixed bug #14168 : Global Function -> Static Method and __autoload() - Fixed bug #14238 :Line length not checket at last line of a file - Fixed bug #14249 : wrong detection of scope_opener - Fixed bug #14250 : ArrayDeclarationSniff emit warnings at malformed array - Fixed bug #14251 : --extensions option doesn't work Dependencies:
|
| 1.1.0RC2 |
Release date: 2008-06-13 00:15 UTC Release state: beta Changelog: - Permission denied errors now stop script execution but still display current errors (feature request #14076) - Added Squiz ValidArrayIndexNameSniff to ensure array indexes do not use camel case - Squiz ArrayDeclarationSniff now ensures arrays are not declared with camel case index values - PEAR ValidVariableNameSniff now alerts about a possible parse error for member vars inside an interface - Fixed bug #13921 : js parsing fails for comments on last line of file - Fixed bug #13922 : crash in case of malformed (but tokenized) php file -- PEAR and Squiz ClassDeclarationSniff now throw warnings for possible parse errors -- Squiz ValidClassNameSniff now throws warning for possible parse errors -- Squiz ClosingDeclarationCommentSniff now throws additonal warnings for parse errors Dependencies:
|
| 1.1.0RC1 |
Release date: 2008-05-12 21:14 UTC Release state: beta Changelog: - Fixed error in PEAR ValidClassNameSniff when checking class names with double underscores - Moved Squiz InlineControlStructureSniff into Generic standard - PEAR standard now throws warnings for inline control structures - Squiz OutputBufferingIndentSniff now ignores the indentation of inline HTML - MySource IncludeSystemSniff now ignores usage of ZipArchive - Removed "function" from error messages for Generic function brace sniffs (feature request #13820) - Generic UpperCaseConstantSniff no longer throws errors for delcare(ticks = ...) -- Thanks to Josh Snyder for the patch - Squiz ClosingDeclarationCommentSniff and AbstractVariableSniff now throw warnings for possible parse errors - Fixed bug #13827 : AbstractVariableSniff throws "undefined index" - Fixed bug #13846 : Bug in Squiz.NonExecutableCodeSniff - Fixed bug #13849 : infinite loop in PHP_CodeSniffer_File::findNext() Dependencies:
|
| 1.1.0a1 |
Release date: 2008-04-20 20:58 UTC Release state: alpha Changelog: - Added support for multiple tokenizers so PHP_CodeSniffer can check more than just PHP files -- PHP_CodeSniffer now has a JS tokenizer for checking JavaScript files -- Sniffs need to be updated to work with additional tokenizers, or new sniffs written for them - phpcs now exits with status 2 if the tokenier extension has been disabled (feature request #13269) - Added scripts/phpcs-svn-pre-commit that can be used as an SVN pre-commit hook - Also reworked the way the phpcs script works to make it easier to wrap it with other functionality - Thanks to Jack Bates for the contribution - Fixed error in phpcs error message when a supplied file does not exist - Fixed a cosmetic error in AbstractPatternSniff where the "found" string was missing some content - Added sniffs that implement part of the PMD rule catalog to the Generic standard -- Thanks to Manuel Pichler for the contribution of all these sniffs. - Squiz FunctionCommentThrowTagSniff no longer throws errors for function that only throw variables - Generic ScopeIndentSniff now has private member to enforce exact indent matching - Replaced Squiz DisallowCountInLoopsSniff with Squiz DisallowSizeFunctionsInLoopsSniff -- Thanks to Jan Miczaika for the sniff - Squiz BlockCommentSniff now checks inline doc block comments - Squiz InlineCommentSniff now checks inline doc block comments - Squiz BlockCommentSniff now checks for no blank line before first comment in a function - Squiz DocCommentAlignmentSniff now ignores inline doc block comments - Squiz ControlStructureSpacingSniff now ensures no blank lines at the start of control structures - Squiz ControlStructureSpacingSniff now ensures no blank lines between control structure closing braces - Squiz IncrementDecrementUsageSniff now ensures inc/dec ops are bracketed in string concats - Squiz IncrementDecrementUsageSniff now ensures inc/dec ops are not used in arithmetic operations - Squiz FunctionCommentSniff no longer throws errors if return value is mixed but function returns void somewhere - Squiz OperatorBracketSniff no allows function call brackets to count as operator brackets - Squiz DoubleQuoteUsageSniff now supports \x \f and \v (feature request #13365) - Squiz ComparisonOperatorUsageSniff now supports JS files - Squiz ControlSignatureSniff now supports JS files - Squiz ForLoopDeclarationSniff now supports JS files - Squiz OperatorBracketSniff now supports JS files - Squiz InlineControlStructureSniff now supports JS files - Generic LowerCaseConstantSniff now supports JS files - Generic DisallowTabIndentSniff now supports JS files - Generic MultipleStatementAlignmentSniff now supports JS files - Added Squiz ObjectMemberCommaSniff to ensure the last member of a JS object is not followed by a comma - Added Squiz ConstantCaseSniff to ensure the PHP constants are uppercase and JS lowercase - Added Squiz JavaScriptLintSniff to check JS files with JSL -- Set path using phpcs --config-set jsl_path /path/to/jsl - Added MySource FirebugConsoleSniff to ban the use of "console" for JS variable and function names - Added MySource JoinStringsSniff to enforce the use of join() to concatenate JS strings - Added MySource AssignThisSniff to ensure this is only assigned to a var called self - Added MySource DisallowNewWidgetSniff to ban manual creation of widget objects - Removed warning shown in Zend CodeAnalyzerSniff when the ZCA path is not set - Fixed error in Squiz ValidVariableNameSniff when checking vars in the form $obj->$var - Fixed error in Squiz DisallowMultipleAssignmentsSniff when checking vars in the form $obj->$var - Fixed error in Squiz InlineCommentSniff where comments for class constants were seen as inline - Fixed error in Squiz BlockCommentSniff where comments for class constants were not ignored - Fixed error in Squiz OperatorBracketSniff where negative numbers were ignored during comparisons - Fixed error in Squiz FunctionSpacingSniff where functions after member vars reported incorrect spacing - Fixed bug #13062 : Interface comments aren't handled in PEAR standard -- Thanks to Manuel Pichler for the path - Fixed bug #13119 : php minimum requirement need to be fix - Fixed bug #13156 : Bug in Squiz_Sniffs_PHP_NonExecutableCodeSniff - Fixed bug #13158 : Strange behaviour in AbstractPatternSniff - Fixed bug #13169 : Undefined variables - Fixed bug #13178 : Catch exception in File.php - Fixed bug #13254 : Notices output in checkstyle report causes XML issues - Fixed bug #13446 : crash with src of phpMyAdmin -- Thanks to Manuel Pichler for the path Dependencies:
|
| 1.0.1 |
Release date: 2008-02-03 18:00 UTC Release state: stable Changelog: - Squiz ArrayDeclarationSniff now throws error if the array keyword is followed by a space - Squiz ArrayDeclarationSniff now throws error for empty multi-line arrays - Squiz ArrayDeclarationSniff now throws error for multi-line arrays with a single value - Squiz DocCommentAlignmentSniff now checks for a single space before tags inside docblocks - Squiz ForbiddenFunctionsSniff now disallows is_null() to force use of (=== NULL) instead - Squiz VariableCommentSniff now continues throwing errors after the first one is found - Squiz SuperfluousWhitespaceSniff now throws errors for multiple blank lines inside functions - MySource IncludedSystemSniff now checks extended class names - MySource UnusedSystemSniff now checks extended and implemented class names - MySource IncludedSystemSniff now supports includeWidget() - MySource UnusedSystemSniff now supports includeWidget() - Added PEAR ValidVariableNameSniff to check that only private member vars are prefixed with an underscore - Added Squiz DisallowCountInLoopsSniff to check for the use of count() in FOR and WHILE loop conditions - Added MySource UnusedSystemSniff to check for included classes that are never used - Fixed a problem that caused the parentheses map to sometimes contain incorrect values - Fixed bug #12767 : Cant run phpcs from dir with PEAR subdir - Fixed bug #12773 : Reserved variables are not detected in strings -- Thanks to Wilfried Loche for the patch - Fixed bug #12832 : Tab to space conversion does not work - Fixed bug #12888 : extra space indentation = Notice: Uninitialized string offset... - Fixed bug #12909 : Default generateDocs function does not work under linux -- Thanks to Paul Smith for the patch - Fixed bug #12957 : PHP 5.3 magic method __callStatic -- Thanks to Manuel Pichler for the patch Dependencies:
|
| 1.0.0 |
Release date: 2007-12-20 22:04 UTC Release state: stable Changelog: - You can now specify the full path to a coding standard on the command line (feature request #11886) -- This allows you to use standards that are stored outside of PHP_CodeSniffer's own Standard dir -- You can also specify full paths in the CodingStandard.php include and exclude methods -- Classes, dirs and files need to be names as if the standard was part of PHP_CodeSniffer -- Thanks to Dirk Thomas for the doc generator patch and testing - Modified the scope map to keep checking after 3 lines for some tokens (feature request #12561) -- Those tokens that must have an opener (like T_CLASS) now keep looking until EOF -- Other tokens (like T_FUNCTION) still stop after 3 lines for performance - You can now esacpe commas in ignore patterns so they can be matched in file names -- Thanks to Carsten Wiedmann for the patch - Config data is now cached in a global var so the file system is not hit so often -- You can also set config data temporarily for the script if you are using your own external script -- Pass TRUE as the third argument to PHP_CodeSniffer::setConfigData() - PEAR ClassDeclarationSniff no longer throws errors for multi-line class declarations - Squiz ClassDeclarationSniff now ensures there is one blank line after a class closing brace - Squiz ClassDeclarationSniff now throws errors for a missing end PHP tag after the end class tag - Squiz IncrementDecrementUsageSniff no longer throws errors when -= and += are being used with vars - Squiz SwitchDeclarationSniff now throws errors for switch statements that do not contain a case statement -- Thanks to Sertan Danis for the patch - MySource IncludeSystemSniff no longer throws errors for the Util package - Fixed bug #12621 : "space after AS" check is wrong -- Thanks to Satoshi Oikawa for the patch - Fixed bug #12645 : error message is wrong -- Thanks to Renoiv for the patch - Fixed bug #12651 : Increment/Decrement Operators Usage at -1 Dependencies:
|
| 1.0.0RC3 |
Release date: 2007-11-29 22:09 UTC Release state: beta Changelog: - Added new command line argument --tab-width that will convert tabs to spaces before testing -- 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 - Added new Squiz DisallowInlineIfSniff to disallow the usage of inline IF statements - Fixed incorrect errors being thrown for nested switches in Squiz SwitchDeclarationSniff - PEAR FunctionCommentSniff no longer complains about missing comments for @throws tags - PEAR FunctionCommentSniff now throws error for missing exception class name for @throws tags - PHP_CodeSniffer_File::isReference() now correctly returns for functions that return references - Generic LineLengthSniff no longer warns about @version lines with CVS or SVN id tags - Generic LineLengthSniff no longer warns about @license lines with long URLs - Squiz FunctionCommentThrowTagSniff no longer complains about throwing variables - Squiz ComparisonOperatorUsageSniff no longer throws incorrect errors for inline IF statements - Squiz DisllowMultipleAssignmentsSniff no longer throws errors for assignments in inline IF statements - Fixed bug #12455 : CodeSniffer treats content inside heredoc as PHP code - Fixed bug #12471 : Checkstyle report is broken - Fixed bug #12476 : PHP4 destructors are reported as error - Fixed bug #12513 : Checkstyle XML messages need to be utf8_encode()d -- Thanks to Sebastian Bergmann for the patch. - Fixed bug #12517 : getNewlineAfter() and dos files Dependencies:
|
| 1.0.0RC2 |
Release date: 2007-11-13 19:45 UTC Release state: beta Changelog: - Added a new Checkstyle report format -- Like the current XML format but modified to look like Checkstyle output -- Thanks to Manuel Pichler for helping get the format correct - You can now hide warnings by default -- Run: phpcs --config-set show_warnings 0 -- If warnings are hidden by default, use the new -w command line argument to override - Added new command line argument --config-delete to delete a config value and revert to the default - Improved overall performance by optimising tokenising and next/prev methods (feature request #12421) -- Thanks to Christian Weiske for the patch - Added FunctionCallSignatureSniff to Squiz standard - Added @subpackage support to file and class comment sniffs in PEAR standard (feature request #12382) -- Thanks to Carsten Wiedmann for the patch - An error is now displayed if you use a PHP version less than 5.1.0 (feature request #12380) -- Thanks to Carsten Wiedmann for the patch - phpcs now exits with status 2 if it receives invalid input (feature request #12380) -- This is distinct from status 1, which indicates errors or warnings were found - Added new Squiz LanguageConstructSpacingSniff to throw errors for additional whitespace after echo etc. - Removed Squiz ValidInterfaceNameSniff - PEAR FunctionCommentSniff no longer complains about unknown tags - Fixed incorrect errors about missing function comments in PEAR FunctionCommentSniff - Fixed incorrect function docblock detection in Squiz FunctionCommentSniff - Fixed incorrect errors for list() in Squiz DisallowMultipleAssignmentsSniff - Errors no longer thrown if control structure is followed by a CASE's BREAK in Squiz ControlStructureSpacingSniff - Fixed bug #12368 : Autoloader cannot be found due to include_path override -- Thanks to Richard Quadling for the patch - Fixed bug #12378 : equal sign alignments problem with while() Dependencies:
|
| 1.0.0RC1 |
Release date: 2007-10-31 21:45 UTC Release state: beta Changelog: - Main phpcs script can now be run from a CVS checkout without installing the package - Added a new CSV report format -- Header row indicates what position each element is in -- Always use the header row to determine positions rather than assuming the format, as it may change - XML and CSV report formats now contain information about which column the error occurred at -- Useful if you want to highlight the token that caused the error in a custom application - Square bracket tokens now have bracket_opener and bracket_closer set - Added new Squiz SemicolonSpacingSniff to throw errors if whitespace is found before a semicolon - Added new Squiz ArrayBracketSpacingSniff to throw errors if whitespace is found around square brackets - Added new Squiz ObjectOperatorSpacingSniff to throw errors if whitespace is found around object operators - Added new Squiz DisallowMultipleAssignmentsSniff to throw errors if multiple assignments are on the same line - Added new Squiz ScopeKeywordSpacingSniff to throw errors if there is not a single space after a scope modifier - Added new Squiz ObjectInstantiationSniff to throw errors if new objects are not assigned to a variable - Added new Squiz FunctionDuplicateArgumentSniff to throw errors if argument is declared multiple times in a function - Added new Squiz FunctionOpeningBraceSpaceSniff to ensure there are no blank lines after a function open brace - Added new Squiz CommentedOutCodeSniff to warn about comments that looks like they are commented out code blocks - Added CyclomaticComplexitySniff to Squiz standard - Added NestingLevelSniff to Squiz standard - Squiz ForbiddenFunctionsSniff now recommends echo() instead of print() - Squiz ValidLogicalOperatorsSniff now recommends ^ instead of xor - Squiz SwitchDeclarationSniff now contains more checks -- A single space is required after the case keyword -- No space is allowed before the colon in a case or default statement -- All switch statements now require a default case -- Default case must contain a break statement -- Empty default case must contain a comment describing why the default is ignored -- Empty case statements are not allowed -- Case and default statements must not be followed by a blank line -- Break statements must be followed by a blank line or the closing brace -- There must be no blank line before a break statement - Squiz standard is now using the PEAR IncludingFileSniff - PEAR ClassCommentSniff no longer complains about unknown tags - PEAR FileCommentSniff no longer complains about unknown tags - PEAR FileCommentSniff now accepts multiple @copyright tags - Squiz BlockCommentSniff now checks that comment starts with a capital letter - Squiz InlineCommentSniff now has better checking to ensure comment starts with a capital letter - Squiz ClassCommentSniff now checks that short and long comments start with a capital letter - Squiz FunctionCommentSniff now checks that short, long and param comments start with a capital letter - Squiz VariableCommentSniff now checks that short and long comments start with a capital letter - Fixed error with multi-token array indexes in Squiz ArrayDeclarationSniff - Fixed error with checking shorthand IF statements without a semicolon in Squiz InlineIfDeclarationSniff - Fixed error where constants used as defulat values in function declarations were seen as type hints - Fixed bug #12316 : PEAR is no longer the default standard - Fixed bug #12321 : wrong detection of missing function docblock Dependencies:
|
| 0.9.0 |
Release date: 2007-09-24 01:46 UTC Release state: beta Changelog: - Added a config system for setting config data across phpcs runs - You can now change the default coding standard from PEAR to something else -- Run: phpcs --config-set default_standard [standard] - Added new Zend coding standard to check code against the Zend Framework standards -- The complete standard is not yet implemented -- Specify --standard=Zend to use -- Thanks to Johann-Peter Hartmann for the contribution of some sniffs -- Thanks to Holger Kral for the Code Analyzer sniff Dependencies:
|
| 0.8.0 |
Release date: 2007-08-08 02:09 UTC Release state: beta Changelog: - Added new XML report format; --report=xml (feature request #11535) -- Thanks to Brett Bieber for the patch - Added new command line argument --ignore to specify a list of files to skip (feature request #11556) - Added PHPCS and MySource coding standards into the core install - Scope map no longer gets confused by curly braces that act as string offsets - Removed CodeSniffer/SniffException.php as it is no longer used - Unit tests can now be run directly from a CVS checkout - Made private vars and functions protected in PHP_CodeSniffer class so this package can be overridden - Added new Metrics category to Generic conding standard -- Contains Cyclomatic Complexity and Nesting Level sniffs -- Thanks to Johann-Peter Hartmann for the contribution - Added new Generic DisallowTabIndentSniff to throw errors if tabs are used for indentation (feature request #11738) -- PEAR and Squiz standards use this new sniff to throw more specific indentation errors - Generic MultipleStatementAlignmentSniff has new private var to set a padding size limit (feature request #11555) - Generic MultipleStatementAlignmentSniff can now handle assignments that span multiple lines (feature request #11561) - Generic LineLengthSniff now has a max line length after which errors are thrown instead of warnings -- BC BREAK: Override the protected member var absoluteLineLimit and set it to zero in custom LineLength sniffs -- Thanks to Johann-Peter Hartmann for the contribution - Comment sniff errors about incorrect tag orders are now more descriptive (feature request #11693) - Fixed bug #11473 : Invalid CamelCaps name when numbers used in names Dependencies:
|
| 0.7.0 |
Release date: 2007-07-01 23:30 UTC Release state: beta Changelog: - BC BREAK: EOL character is now auto-detected and used instead of hard-coded \n -- Pattern sniffs must now specify "EOL" instead of "\n" or "\r\n" to use auto-detection -- Please use $phpcsFile->eolChar to check for newlines instead of hard-coding "\n" or "\r\n" -- Comment parser classes now require you to pass $phpcsFile as an additional argument - BC BREAK: Included and excluded sniffs now require .php extension -- Please update your coding standard classes and add ".php" to all sniff entries -- See CodeSniffer/Standards/PEAR/PEARCodingStandard.php for an example - Fixed error where including a directory of sniffs in a coding standard class did not work - Coding standard classes can now specify a list of sniffs to exclude as well as include (feature request #11056) - Two uppercase characters can now be placed side-by-side in class names in Squiz ValidClassNameSniff - SVN tags now allowed in PEAR file doc blocks (feature request #11038) -- Thanks to Torsten Roehr for the patch - Private methods in commenting sniffs and comment parser are now protected (feature request #11087) - Added Generic LineEndingsSniff to check the EOL character of a file - PEAR standard now only throws one error per file for incorrect line endings (eg. /r/n) - Command line arg -v now shows number of registered sniffs - Command line arg -vvv now shows list of registered sniffs - Squiz ControlStructureSpacingSniff no longer throws errors if the control structure is at the end of the script - Squiz FunctionCommentSniff now throws error for "return void" if function has return statement - Squiz FunctionCommentSniff now throws error for functions that return void but specify something else - Squiz ValidVariableNameSniff now allows multiple uppercase letters in a row - Squiz ForEachLoopDeclarationSniff now throws error for AS keyword not being lowercase - Squiz SwitchDeclarationSniff now throws errors for CASE/DEFAULT/BREAK keywords not being lowercase - Squiz ArrayDeclarationSniff now handles multi-token array values when checking alignment - Squiz standard now enforces a space after cast tokens - Generic MultipleStatementAlignmentSniff no longer gets confused by assignments inside FOR conditions - Generic MultipleStatementAlignmentSniff no longer gets confused by the use of list() - Added Generic SpaceAfterCastSniff to ensure there is a single space after a cast token - Added Generic NoSpaceAfterCastSniff to ensure there is no whitespace after a cast token - Added PEAR ClassDeclarationSniff to ensure the opening brace of a class is on the line after the keyword - Added Squiz ScopeClosingBraceSniff to ensure closing braces are aligned correctly - Added Squiz EvalSniff to discourage the use of eval() - Added Squiz LowercaseDeclarationSniff to ensure all declaration keywords are lowercase - Added Squiz LowercaseClassKeywordsSniff to ensure all class declaration keywords are lowercase - Added Squiz LowercaseFunctionKeywordsSniff to ensure all function declaration keywords are lowercase - Added Squiz LowercasePHPFunctionsSniff to ensure all calls to inbuilt PHP functions are lowercase - Added Squiz CastSpacingSniff to ensure cast statements dont contain whitespace - Errors no longer thrown when checking 0 length files with verbosity on - Fixed bug #11105 : getIncludedSniffs() not working anymore -- Thanks to Blair Robertson for the patch - Fixed bug #11120 : Uninitialized string offset in AbstractParser.php on line 200 Dependencies:
|
| 0.6.0 |
Release date: 2007-05-14 23:57 UTC Release state: beta Changelog: - The number of errors and warnings found is now shown for each file while checking the file if verbosity is enabled - Now using PHP_EOL instead of hard-coded \n so output looks good on Windows (feature request #10761) - Thanks to Carsten Wiedmann for the patch. - phpcs now exits with status 0 (no errors) or 1 (errors found) (feature request #10348) - Added new -l command line argument to stop recursion into directories (feature request #10979) - Fixed variable name error causing incorrect error message in Squiz ValidVariableNameSniff - Fixed bug #10757 : Error in ControlSignatureSniff - Fixed bugs #10751, #10777 : Sniffer class paths handled incorrectly in Windows - Thanks to Carsten Wiedmann for the patch. - Fixed bug #10961 : Error "Last parameter comment requires a blank newline after it" thrown - Fixed bug #10983 : phpcs outputs notices when checking invalid PHP - Fixed bug #10980 : Incorrect warnings for equals sign Dependencies:
|
| 0.5.0 |
Release date: 2007-04-16 23:25 UTC Release state: beta Changelog: - BC BREAK: Coding standards now require a class to be added so PHP_CodeSniffer can get information from them - Please read the end user docs for info about the new class required for all coding standards - Coding standards can now include sniffs from other standards, or whole standards, without writing new sniff files - PHP_CodeSniffer_File::isReference() now correctly returns for references in function declarations - PHP_CodeSniffer_File::isReference() now returns false if you don't pass it a T_BITWISE_AND token - PHP_CodeSniffer_File now stores the absolute path to the file so sniffs can check file locations correctly - Fixed undefined index error in AbstractVariableSniff for variables inside an interface function definition - Added MemberVarSpacingSniff to Squiz standard to enforce one-line spacing between member vars - Add FunctionCommentThrowTagSniff to Squiz standard to check that @throws tags are correct - Fixed problems caused by references and type hints in Squiz FunctionDeclarationArgumentSpacingSniff - Fixed problems with errors not being thrown for some misaligned @param comments in Squiz FunctionCommentSniff - Fixed badly spaced comma error being thrown for "extends" class in Squiz ClassDeclarationSniff - Errors no longer thrown for class method names in Generic ForbiddenFunctionsSniff - Errors no longer thrown for type hints in front of references in Generic UpperCaseConstantNameSniff - Errors no longer thrown for correctly indented buffered lines in Squiz ScopeIndexSniff - Errors no longer thrown for user-defined functions named as forbidden functions in Generic ForbiddenFunctionsSniff - Errors no longer thrown on __autoload functions in PEAR ValidFunctionNameSniff - Errors now thrown for __autoload methods in PEAR ValidFunctionNameSniff - Errors now thrown if constructors or destructors have @return tags in Squiz FunctionCommentSniff - Errors now thrown if @throws tags dont start with a capital and end with a full stop in Squiz FunctionCommentSniff - Errors now thrown for invalid @var tag values in Squiz VariableCommentSniff - Errors now thrown for missing doc comment in Squiz VariableCommentSniff - Errors now thrown for unspaced operators in FOR loop declarations in Squiz OperatorSpacingSniff - Errors now thrown for using ob_get_clean/flush functions to end buffers in Squiz OutputBufferingIndentSniff - Errors now thrown for all missing member variable comments in Squiz VariableCommentSniff Dependencies:
|
| 0.4.0 |
Release date: 2007-02-18 17:39 UTC Release state: beta Changelog: - Standard name specified with --standard command line argument is no longer case sensitive - Long error and warning messages are now wrapped to 80 characters in the full error report (thanks Endre Czirbesz) - Shortened a lot of error and warning messages so they don't take up so much room - Squiz FunctionCommentSniff now checks that param comments start with a captial letter and end with a full stop - Squiz FunctionSpacingSniff now reports incorrect lines below function on closing brace, not function keyword - Squiz FileCommentSniff now checks that there are no blank lines between the open PHP tag and the comment - PHP_CodeSniffer_File::isReference() now returns correctly when checking refs on right side of => - Fixed incorrect error with switch closing brace in Squiz SwitchDeclarationSniff - Fixed missing error when multiple statements are not aligned correctly with object operators - Fixed incorrect errors for some PHP special variables in Squiz ValidVariableNameSniff - Fixed incorrect errors for arrays that only contain other arrays in Squiz ArrayDeclarationSniff - Fixed bug #9844 : throw new Exception(\n accidently reported as error but it ain't Dependencies:
|
| 0.3.0 |
Release date: 2007-01-11 17:01 UTC Release state: beta Changelog: - Updated package.xml to version 2 - Specifying coding standard on command line is now optional, even if you have multiple standards installed - PHP_CodeSniffer uses the PEAR coding standard by default if no standard is specified - New command line option, --extensions, to specify a comma separated list of file extensions to check - Converted all unit tests to PHPUnit 3 format - Added new coding standard, Squiz, that can be used as an alternative to PEAR - also contains more examples of sniffs - some may be moved into the Generic coding standard if required - Added MultipleStatementAlignmentSniff to Generic standard - Added ScopeIndentSniff to Generic standard - Added ForbiddenFunctionsSniff to Generic standard - Added FileCommentSniff to PEAR standard - Added ClassCommentSniff to PEAR standard - Added FunctionCommentSniff to PEAR standard - Change MultipleStatementSniff to MultipleStatementAlignmentSniff in PEAR standard - Replaced Methods directory with Functions directory in Generic and PEAR standards - also renamed some of the sniffs in those directories - Updated file, class and method comments for all files - Fixed bug #9274 : nested_parenthesis element not set for open and close parenthesis tokens - Fixed bug #9411 : too few pattern characters cause incorrect error report Dependencies:
|
| 0.2.0 |
Release date: 2006-10-12 18:41 UTC Release state: alpha Changelog: - Added a generic standards package that will contain generic sniffs to be used in specific coding standards (thanks to Frederic Poeydomenge for the idea) - Changed PEAR standard to use generic sniffs where available - Added LowerCaseConstantSniff to Generic standard - Added UpperCaseConstantSniff to Generic standard - Added DisallowShortOpenTagSniff to Generic standard - Added LineLengthSniff to Generic standard - Added UpperCaseConstantNameSniff to Generic standard - Added OpeningMethodBraceBsdAllmanSniff to Generic standard (contrib by Frederic Poeydomenge) - Added OpeningMethodBraceKernighanRitchieSniff to Generic standard (contrib by Frederic Poeydomenge) - Added framework for core PHP_CodeSniffer unit tests - Added unit test for PHP_CodeSniffer:isCamelCaps method - ScopeClosingBraceSniff now checks indentation of BREAK statements - Added new command line arg (-vv) to show developer debug output - Fixed some coding standard errors - Fixed bug #8834 : Massive memory consumption - Fixed bug #8836 : path case issues in package.xml - Fixed bug #8843 : confusion on nested switch() - Fixed bug #8841 : comments taken as whitespace - Fixed bug #8884 : another problem with nested switch() statements Dependencies:
|
| 0.1.1 |
Release date: 2006-09-25 00:12 UTC Release state: alpha Changelog: - Added unit tests for all PEAR sniffs - Exception class now extends from PEAR_Exception - Fixed summary report so files without errors but with warnings are not shown when warnings are hidden Dependencies:
|
| 0.1.0 |
Release date: 2006-09-18 18:18 UTC Release state: alpha Changelog: - Reorganised package contents to conform to PEAR standards - Changed version numbering to conform to PEAR standards - Removed duplicate require_once() of Exception.php from CodeSniffer.php Dependencies:
|
| 0.0.5 |
Release date: 2006-09-18 01:30 UTC Release state: alpha Changelog: - Fixed .bat file for situation where php.ini cannot be found so include_path is not set Dependencies:
|