Fix and require phpcs in gitlab-ci

Created on 25 November 2024, 26 days ago

Problem/Motivation

See ๐ŸŒฑ Add Tests and enable gitlab-ci Active

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @joelpittet
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    joelpittet โ†’ changed the visibility of the branch 3489746-fix-and-require to hidden.

  • Merge request !39Resolve #3489746 "Phpcs" โ†’ (Merged) created by joelpittet
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    joelpittet โ†’ changed the visibility of the branch 8.x-1.x to hidden.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    joelpittet โ†’ changed the visibility of the branch 3489746-phpcs to hidden.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    joelpittet โ†’ changed the visibility of the branch 3489746-phpcs to active.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia lavanyatalwar

    Working on it.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    @lavanyatalwar Thanks for taking this on. There is a lot of commented code, so don't worry if you don't get them all, any progress on this is great.

    A tip: When working on Drupal issues, avoid assigning them to yourself unless youโ€™re actively fixing them. Assigned issues can give the impression theyโ€™re in progress, even if theyโ€™ve been set aside. Instead, leave a comment (as you did) with your thoughts or progress, and make small commits to contribute towards a solution. This keeps the issue visible and encourages collaboration.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia lavanyatalwar

    @joelpittet, I was working on the file CalendarHelper.php, and it contains some commented code that causes PHPCS errors due to indentation issues with spaces. Should I remove the commented code or fix the indentation?
    Error-

      511 | ERROR   | Comment indentation error, expected only 1 spaces
      513 | WARNING | Line exceeds 80 characters; contains 94 characters
      513 | ERROR   | Comment indentation error, expected only 3 spaces
      516 | ERROR   | Comment indentation error, expected only 3 spaces
      519 | WARNING | Line exceeds 80 characters; contains 128 characters
      519 | ERROR   | Comment indentation error, expected only 3 spaces
      522 | WARNING | Line exceeds 80 characters; contains 130 characters
      522 | ERROR   | Comment indentation error, expected only 3 spaces
      523 | WARNING | Line exceeds 80 characters; contains 98 characters
      526 | WARNING | Line exceeds 80 characters; contains 127 characters
      526 | ERROR   | Comment indentation error, expected only 3 spaces
      527 | WARNING | Line exceeds 80 characters; contains 92 characters
      532 | ERROR   | Comment indentation error, expected only 1 spaces

    code-

    // $from_to = [
            // $table_name . '.' . $db_info['columns'][$table_name]['value'],
            // $table_name . '.' . (!empty($field['settings']['todate'])
            // ? $db_info['columns'][$table_name]['value2']
            // : $db_info['columns'][$table_name]['value']),
            // ];
            // if (isset($field['settings']['tz_handling'])) {
            //   $tz_handling = $field['settings']['tz_handling'];
            //   $db_info = date_api_database_info($field, $revision);
            //   if ($tz_handling == 'date') {
            //     $offset_field = $table_name . '.' . $db_info['columns'][$table_name]['offset'];
            //   }
            //   $related_fields = [
            //     $table_name . '.' . $db_info['columns'][$table_name]['value'],
            //   ];
            //   if (isset($db_info['columns'][$table_name]['value2'])) {
            //     $related_fields = array_merge($related_fields, [$table_name . '.' . $db_info['columns'][$table_name]['value2']]);
            //   }
            //   if (isset($db_info['columns'][$table_name]['timezone'])) {
            //     $related_fields = array_merge($related_fields, [$table_name . '.' . $db_info['columns'][$table_name]['timezone']]);
            //     $timezone_field = $table_name . '.' . $db_info['columns'][$table_name]['timezone'];
            //   }
            //   if (isset($db_info['columns'][$table_name]['rrule'])) {
            //     $related_fields = array_merge($related_fields, [$table_name . '.' . $db_info['columns'][$table_name]['rrule']]);
            //            $rrule_field = $table_name . '.' . $db_info['columns'][$table_name]['rrule'];
            //          }
            //        }
            // Get the delta value into the query.
            // if ($field['cardinality'] != 1) {
            //   array_push($related_fields, "$table_name.delta");
            //   $delta_field = $table_name . '_delta';
            // }
  • Pipeline finished with Failed
    26 days ago
    Total: 217s
    #350422
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    @lavanyatalwar leave that commented code, don't change the indents or delete it, it needs to be evaluated to see if it's needed (beyond scope of this issue)

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia lavanyatalwar

    @joelpittet,
    I have addressed all the PHPCS errors except for those related to the commented code. I'll now focus on the MR comments.

  • Pipeline finished with Failed
    25 days ago
    Total: 155s
    #351792
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada joelpittet Vancouver

    Thanks for your help on this @lavanyatalwar

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024