- 🇮🇹Italy apaderno Brescia, 🇮🇹
The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
- Status changed to Needs review
over 1 year ago 9:21am 12 June 2023 - 🇮🇳India Ashutosh Ahirwal India
Providing patch with fixes of phpcs issue using command
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt,md,css,js,yml web/modules/custom/uikit - Status changed to Needs work
over 1 year ago 11:33am 12 June 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
The status is for the issue summary, which still does not show the command used to produce that report and which arguments have been passed to that command.
- 🇮🇳India arpitk
Hi the patch #10 applied cleanly however there are few more issues needs to be fixed.
arpitkayare@Arpitk:~/drupal_9.5/web/themes/contrib/uikit$ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig,js .
FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/theme-settings.php
-----------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------------
13 | ERROR | Invalid function name, expected s_ta_rt_er_ki_t_form_system_theme_settings_alter but found STARTERKIT_form_system_theme_settings_alter
-----------------------------------------------------------------------------------------------------------------------------------------------------FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/preprocess.inc
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
----------------------------------------------------------------------------------------------
20 | WARNING | There must be no blank line following an inline comment
28 | WARNING | There must be no blank line following an inline comment
36 | WARNING | There must be no blank line following an inline comment
44 | WARNING | There must be no blank line following an inline comment
52 | WARNING | There must be no blank line following an inline comment
60 | WARNING | There must be no blank line following an inline comment
70 | WARNING | There must be no blank line following an inline comment
78 | WARNING | There must be no blank line following an inline comment
86 | WARNING | There must be no blank line following an inline comment
94 | WARNING | There must be no blank line following an inline comment
102 | WARNING | There must be no blank line following an inline comment
110 | WARNING | There must be no blank line following an inline comment
----------------------------------------------------------------------------------------------FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/process.inc
-------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------
20 | WARNING | There must be no blank line following an inline comment
-------------------------------------------------------------------------------------------FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/alter.inc
-----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
26 | WARNING | There must be no blank line following an inline comment
-----------------------------------------------------------------------------------------FILE: /home/arpitkayare/drupal_9.5/web/themes/contrib/uikit/STARTERKIT/includes/theme.inc
-----------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------
17 | WARNING | There must be no blank line following an inline comment
-----------------------------------------------------------------------------------------Thanks!
- Assigned to sourabhjain
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 12:28pm 12 June 2023 - 🇮🇳India sourabhjain
I have fixed all the issues but still below are remaining.
sourabhjain@LPT-SOURABH uikit % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml . FILE: /Users/sourabhjain/www/drupal/modules/contrib/uikit/STARTERKIT/theme-settings.php ----------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------------------- 13 | ERROR | Invalid function name, expected s_ta_rt_er_ki_t_form_system_theme_settings_alter but found STARTERKIT_form_system_theme_settings_alter ----------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/sourabhjain/www/drupal/modules/contrib/uikit/src/UIkit.php ----------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------- 133 | ERROR | Type hint "null" missing for $setting -----------------------------------------------------------------------
Attaching patch and interdiff file.
- Status changed to Needs work
over 1 year ago 2:18pm 12 June 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
I did not make a complete review. The following change is not required from the report shown in the issue summary.
Drupal.theme.progressBar = function (id) { - return '<div id="' + id + '" class="progress" aria-live="polite">' + - '<div class="progress__label"> </div>' + - '<div class="progress__track">' + - '<progress class="uk-progress" value="" max="100"></progress>' + - '</div>' + - '<div class="progress__percentage"></div>' + - '<div class="progress__description"> </div>' + - '</div>'; + return ` + < div id = "${id}" class = "progress" aria - live = "polite" > + < div class = "progress__label" > & nbsp; < / div > + < div class = "progress__track" > + < progress class = "uk-progress" value = "" max = "100" > < / progress > + < / div > + < div class = "progress__percentage" > < / div > + < div class = "progress__description" > & nbsp; < / div > + < / div > + `;
Adding spaces inside HTML tags is also not correct.
- Assigned to arti_parmar
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 6:09am 8 August 2023 - Status changed to Needs work
over 1 year ago 11:35am 8 August 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
var nodeID = $placeholder.closest('[data-history-node-id]').attr('data-history-node-id'); if (Drupal.history.needsServerCheck(nodeID, commentTimestamp)) { nodeIDs.push(nodeID); - return true; + return TRUE; } else { - return false; + return FALSE;
In JavaScript, we use
true
, notTRUE
,false
instead ofFALSE
, andnull
instead ofNULL
.- return '<div id="' + id + '" class="progress" aria-live="polite">' + - '<div class="progress__label"> </div>' + - '<div class="progress__track">' + - '<progress class="uk-progress" value="" max="100"></progress>' + - '</div>' + - '<div class="progress__percentage"></div>' + - '<div class="progress__description"> </div>' + - '</div>'; + return ` + <div id = "${id}" class = "progress" aria-live = "polite"> + <div class = "progress__label"> & nbsp; </div> + <div class = "progress__track"> + <progress class = "uk-progress" value = "" max = "100" > </progress> + </div> + <div class = "progress__percentage"> </div> + <div class = "progress__description"> & nbsp; </div> + </div> + `;
These changes are still not required by the report shown in the issue summary.
Furthermore, it is
, not& nbsp;
. It does not even need spaces before/after a HTML tag. - Status changed to Needs review
over 1 year ago 4:34am 9 August 2023 - Status changed to Needs work
over 1 year ago 10:46am 11 August 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
-function STARTERKIT_theme_suggestions_alter(array &$suggestions, array $variables) { +function STARTERKIT_theme_suggestions_alter( +array &$suggestions, array $variables) {
As per Drupal coding standards, function declarations are written on a single line.
if ($form_advanced) { - $suggestions[] = 'form_element__' . 'advanced'; + $suggestions[] = 'form_element__advanced'; }
That change is not fixing a warning/error shown by PHP_CodeSniffer and it is off-topic for this issue.
- return '<div id="' + id + '" class="progress" aria-live="polite">' + - '<div class="progress__label"> </div>' + - '<div class="progress__track">' + - '<progress class="uk-progress" value="" max="100"></progress>' + - '</div>' + - '<div class="progress__percentage"></div>' + - '<div class="progress__description"> </div>' + - '</div>'; + return ` + <div id="${id}" class="progress" aria-live="polite"> + <div class="progress__label"> </div> + <div class="progress__track"> + <progress class="uk-progress" value="" max="100" > </progress> + </div> + <div class="progress__percentage"> </div> + <div class="progress__description"> </div> + </div> + `;
That change does not fix any error/warning reported by PHP_CodeSniffer and it is off-topic for this issue.
- Status changed to Needs review
over 1 year ago 11:40am 11 August 2023 - Status changed to Needs work
over 1 year ago 11:29am 14 August 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- tableOffset: null, + tableOffset: NULL, - tableHeight: null, + tableHeight: NULL, - stickyVisible: false, + stickyVisible: FALSE, createSticky: function createSticky() { - var $stickyHeader = this.$originalHeader.clone(true); + var $stickyHeader = this.$originalHeader.clone(TRUE);
The existing code is already correct, since in JavaScript code we use
true
,false
, andnull
. PHP_CodeSNiffer applies PHP rules to JavaScript code, which makes those errors/warnings false positive.+/** + * Class to provide functionality of ScriptHandler. + */ class ScriptHandler {
That description does not say what is the purpose of that class. That could be said for every class, since every class provide functionality of themselves. The description must say what that functionality is.
+ /** + * {@inheritdoc} + */ public static function subtheme(Event $event) {
A class without parent classes, which does not implemented any interface, does not have inherited methods.
+ * module_load_include() function, except targeting theme include files. + * It also allows you to place the include files in a sub-directory of the + * theme for better organization.
Since that comment is changed, it should also be changed to avoid any reference to a deprecated function.
* @param null $setting * The machine-name of the theme setting to retrieve. - * @param $theme + * @param string $theme
Since that documentation comment is changed, the type for
$setting
must be corrected too./** - * @mainpage UIkit + * @file + * Welcome to the UIkit developer's documentation.
What follows
@file
is a line with a description of the file content. That is not a description of the file content. - 🇮🇳India Yashaswi18
I tried applying the patch provided in #24, throws error. Comments are yet to be addressed .