Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/362602 )
Change subject: Ensure all FunctionComment sniff codes are standard ...................................................................... Ensure all FunctionComment sniff codes are standard These were missing the category ("Commenting") as the second part of the error code. Change-Id: I020646e4e90aa4f430815f857ad74db1a11a7420 --- M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php M MediaWiki/Tests/files/Commenting/commenting_function.php.expect 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/02/362602/1 diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php index 8ae12c6..157506f 100644 --- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php +++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php @@ -107,7 +107,7 @@ $phpcsFile->addError( 'Missing function doc comment', $stackPtr, - "MediaWiki.FunctionComment.Missing.$visStr" + "MissingDocumentation$visStr" // Note: because we include . in the code, we need the "MediaWiki" standard prefix ); $phpcsFile->recordMetric( $stackPtr, 'Function has doc comment', 'no' ); diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect index ca46d2e..317f2ce 100644 --- a/MediaWiki/Tests/files/Commenting/commenting_function.php.expect +++ b/MediaWiki/Tests/files/Commenting/commenting_function.php.expect @@ -1,11 +1,11 @@ 5 | ERROR | [ ] Missing function doc comment - | | (MediaWiki.FunctionComment.Missing.Public) + | | (MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic) 9 | ERROR | [ ] Missing function doc comment - | | (MediaWiki.FunctionComment.Missing.Public) + | | (MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic) 16 | ERROR | [ ] Missing @return tag in function comment | | (MediaWiki.Commenting.FunctionComment.MissingReturn) 22 | ERROR | [x] Expected 1 spaces after parameter name; 2 found | | (MediaWiki.Commenting.FunctionComment.SpacingAfterParamName) 23 | ERROR | [x] Expected 1 spaces after parameter name; 3 found | | (MediaWiki.Commenting.FunctionComment.SpacingAfterParamName) -PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY \ No newline at end of file +PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -- To view, visit https://gerrit.wikimedia.org/r/362602 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I020646e4e90aa4f430815f857ad74db1a11a7420 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Legoktm <lego...@member.fsf.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits