?
avatar zero-24
zero-24
22 Nov 2017

Steps to reproduce the issue

The new console files throw drone errors

FILE: ...ithub.com/joomla/joomla-cms/libraries/src/Console/CleanCacheCommand.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 55 | ERROR | Opening parenthesis of a multi-line function call must be the
    |       | last content on the line
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...hub.com/joomla/joomla-cms/libraries/src/Console/CheckUpdatesCommand.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 62 | ERROR | Opening parenthesis of a multi-line function call must be the
    |       | last content on the line
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------

FILE: ...b.com/joomla/joomla-cms/libraries/src/Console/RemoveOldFilesCommand.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
 61 | ERROR | Opening parenthesis of a multi-line function call must be the
    |       | last content on the line
--------------------------------------------------------------------------------
UPGRADE TO PHP_CODESNIFFER 2.0 TO FIX ERRORS AUTOMATICALLY
--------------------------------------------------------------------------------

Expected result

No drone errors

Actual result

Drone errors about this kind of line: https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Console/CheckUpdatesCommand.php#L62

Additional comments

@mbabker can you take a look here. As I'm not sure how to handle that.

To me we can do something like:

$this->setHelp("The <info>%command.name%</info> command cleans the system cache of expired entries<br><info>php %command.full_name%</info>");

But i have not worked with console apps so maybe i don't get the point there?

avatar zero-24 zero-24 - open - 22 Nov 2017
avatar joomla-cms-bot joomla-cms-bot - change - 22 Nov 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Nov 2017
avatar mbabker
mbabker - comment - 22 Nov 2017

No. You cannot use HTML like that in a CLI context. Specifically the problem is (as noted in the other issue open about this) that PHPCS and our multi-line rule do not deal with heredoc syntax.

It is a known issue already specifically with the PHPCS sniffer ruleset.

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Nov 2017
Category CLI
avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Nov 2017
Status New Discussion
avatar zero-24 zero-24 - change - 30 Nov 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-11-30 12:14:29
Closed_By zero-24
avatar zero-24 zero-24 - close - 30 Nov 2017

Add a Comment

Login with GitHub to post a comment