Fix phpcs validation errors

Created on 18 April 2024, about 1 year ago

This is a follow up to the "Add support for new Gitlab CI Pipelines task".

Once the pipeline validation jobs are in place, there are a number of phpcs errors that need to be fixed in order to comply with Drupal code standards.

See for a list of issues https://git.drupalcode.org/issue/smart_ip-3421102/-/jobs/1348680

πŸ“Œ Task
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain guiu.rocafort.ferrer Barcelona

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @guiu.rocafort.ferrer
  • Pipeline finished with Success
    about 1 year ago
    Total: 424s
    #149944
  • πŸ‡ͺπŸ‡ΈSpain guiu.rocafort.ferrer Barcelona

    I've managed to fix all the phpcs errors except for one.

    --------------------------------------------------------------------------------
    167 | ERROR | All functions defined in a module file must be prefixed with the
    | | module's name, found "coordinates_dd_to_dms" but expected
    | | "smart_ip_coordinates_dd_to_dms"
    | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix)
    --------------------------------------------------------------------------------

    I am a bit concerned that changing that function name might break other contrib / custom modules that make use of it, so i am not sure about what might be the best approach for this.

    I am thinking that when a new version including this change comes out, it should at least have a change notice, specifying that this function have changed name. Not sure if this is such big of a deal, but want to know what the mantainers position is in that matter.

  • Status changed to Needs work about 1 year ago
  • πŸ‡ͺπŸ‡ΈSpain guiu.rocafort.ferrer Barcelona

    Changing the ticket status to needs work.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States bluegeek9

    bluegeek9 β†’ changed the visibility of the branch 8.x-4.x to hidden.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 376s
    #461972
  • Pipeline finished with Failed
    about 1 month ago
    Total: 349s
    #461989
  • πŸ‡ͺπŸ‡ΈSpain guiu.rocafort.ferrer Barcelona

    The phpcs validation is passing now. For some reason the phpunit starting failing because it is trying to test it against Drupal 11, and the module does not support 11.

    Please review

Production build 0.71.5 2024