backdrop-contrib / paragraphs

Paragraphs module to control your content flow
https://backdropcms.org/project/paragraphs
GNU General Public License v2.0
5 stars 11 forks source link

Coding Standards #89

Closed laryn closed 3 years ago

laryn commented 3 years ago

Now that Github actions run coding standards, the first report indicates that there are some improvements needed... and also potentially some .inc files that need to be excluded from the tests.

FILE: ...er/work/paragraphs/paragraphs/views/paragraphs_handler_relationship.inc
--------------------------------------------------------------------------------
  2 | ERROR | Missing file doc comment
  6 | ERROR | Class name must begin with a capital letter
  6 | ERROR | Class name must use UpperCamel naming without underscores
 14 | ERROR | Public method name
    |       | "paragraphs_handler_relationship::option_definition" is not in
    |       | lowerCamel format, it must not contain underscores
 29 | ERROR | Public method name
    |       | "paragraphs_handler_relationship::options_form" is not in
    |       | lowerCamel format, it must not contain underscores
 58 | ERROR | Public method name
    |       | "paragraphs_handler_relationship::ensure_my_table" is not in
    |       | lowerCamel format, it must not contain underscores
--------------------------------------------------------------------------------

FILE: ...s/paragraphs/migrate/fields/ParagraphsMigrateParagraphsFieldHandler.inc
--------------------------------------------------------------------------------
 2 | ERROR | Missing file doc comment
--------------------------------------------------------------------------------

FILE: ...hs/paragraphs/migrate/destinations/MigrateDestinationParagraphsItem.inc
--------------------------------------------------------------------------------
   2 | ERROR | Missing file doc comment
  13 | ERROR | Class property $field_name should use lowerCamel naming without
     |       | underscores
  66 | ERROR | Function comment short description must end with a full stop
 122 | ERROR | Whitespace found at end of line
 138 | ERROR | Whitespace found at end of line
 157 | ERROR | Whitespace found at end of line
--------------------------------------------------------------------------------

FILE: /home/runner/work/paragraphs/paragraphs/ParagraphsItemEntity.inc
--------------------------------------------------------------------------------
   2 | ERROR | Missing file doc comment
  62 | ERROR | Class property $item_id should use lowerCamel naming without
     |       | underscores
  69 | ERROR | Class property $revision_id should use lowerCamel naming without
     |       | underscores
  76 | ERROR | Class property $field_name should use lowerCamel naming without
     |       | underscores
  83 | ERROR | Class property $default_revision should use lowerCamel naming
     |       | without underscores
 103 | ERROR | Variable "entityType" is camel caps format. do not use mixed
     |       | case (camelCase), use lower case and _
--------------------------------------------------------------------------------

FILE: ...graphs/plugins/panelizer/entity/PanelizerEntityParagraphsItem.class.php
--------------------------------------------------------------------------------
   2 | ERROR | Missing file doc comment
  15 | ERROR | Class property $supports_revisions should use lowerCamel naming
     |       | without underscores
  22 | ERROR | Class property $entity_admin_root should use lowerCamel naming
     |       | without underscores
  29 | ERROR | Class property $entity_admin_bundle should use lowerCamel naming
     |       | without underscores
  36 | ERROR | Class property $views_table should use lowerCamel naming without
     |       | underscores
  41 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::entity_access" is not in
     |       | lowerCamel format, it must not contain underscores
  48 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::entity_plus_save" is not in
     |       | lowerCamel format, it must not contain underscores
  55 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::entity_identifier" is not in
     |       | lowerCamel format, it must not contain underscores
  62 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::entity_bundle_label" is not in
     |       | lowerCamel format, it must not contain underscores
  69 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::entity_allows_revisions" is not
     |       | in lowerCamel format, it must not contain underscores
  81 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::get_default_display" is not in
     |       | lowerCamel format, it must not contain underscores
  90 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::add_bundle_setting_form" is not
     |       | in lowerCamel format, it must not contain underscores
 105 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::hook_form_alter" is not in
     |       | lowerCamel format, it must not contain underscores
 124 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::hook_page_alter" is not in
     |       | lowerCamel format, it must not contain underscores
 134 | ERROR | Variable "operationsCol" is camel caps format. do not use mixed
     |       | case (camelCase), use lower case and _
 135 | ERROR | Variable "operationsCol" is camel caps format. do not use mixed
     |       | case (camelCase), use lower case and _
 136 | ERROR | Variable "operationsColKey" is camel caps format. do not use
     |       | mixed case (camelCase), use lower case and _
 137 | ERROR | Variable "operationsColKey" is camel caps format. do not use
     |       | mixed case (camelCase), use lower case and _
 156 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::hook_field_attach_form" is not
     |       | in lowerCamel format, it must not contain underscores
 169 | ERROR | Public method name
     |       | "PanelizerEntityParagraphsItem::hook_field_attach_submit" is not
     |       | in lowerCamel format, it must not contain underscores
--------------------------------------------------------------------------------

FILE: .../runner/work/paragraphs/paragraphs/ParagraphsItemMetadataController.inc
--------------------------------------------------------------------------------
 2 | ERROR | Missing file doc comment
--------------------------------------------------------------------------------

FILE: /home/runner/work/paragraphs/paragraphs/paragraphs.module
--------------------------------------------------------------------------------
  423 | ERROR | Use "elseif" in place of "else if"
 1033 | ERROR | Inline comments must start with a capital letter
 1033 | ERROR | Inline comments must end in full-stops, exclamation marks, or
      |       | question marks
 1050 | ERROR | Missing parameter type at position 1
 1059 | ERROR | There must be exactly one blank line between descriptions in
      |       | function comment
 1220 | ERROR | Inline comments must end in full-stops, exclamation marks, or
      |       | question marks
 1466 | ERROR | Inline comments must end in full-stops, exclamation marks, or
      |       | question marks
--------------------------------------------------------------------------------

FILE: /home/runner/work/paragraphs/paragraphs/paragraphs.field_widget.inc
--------------------------------------------------------------------------------
 273 | ERROR | If the line declaring an array spans longer than 80 characters,
     |       | each element should be broken into its own line
 634 | ERROR | If the line declaring an array spans longer than 80 characters,
     |       | each element should be broken into its own line
--------------------------------------------------------------------------------

FILE: /home/runner/work/paragraphs/paragraphs/theme/paragraphs.theme.inc
--------------------------------------------------------------------------------
 37 | ERROR | Whitespace found at end of line
--------------------------------------------------------------------------------