Prechecker results: error


Overview

(0 errors, 0 warnings)

This section shows the general problems detected when processing the code [More info]


PHP lint problems

(0 errors, 0 warnings)

This section shows php lint problems in the code detected by php -l [More info]


PHP coding style problems

(84 errors, 50 warnings)

This section shows the coding style problems detected in the code by phpcs [More info]

lib/editor/tiny/plugins/generico/classes/constants.php
(#27) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#29) Missing docblock for class constants
(#31) Missing docblock for constant constants::M_COMPONENT
(#33) File must end with a newline character
lib/editor/tiny/plugins/generico/classes/plugininfo.php
(#33) Missing docblock for class plugininfo
(#35) Missing docblock for function get_available_buttons
(#41) Missing docblock for function get_available_menuitems
(#47) Missing docblock for function get_plugin_configuration_for_context
(#54) Commas (,) must be followed by white space.
(#57) Expected 1 space before "="; 0 found
(#57) Expected 1 space after "="; 0 found
(#58) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#65) Inline comments must end in full-stops, exclamation marks, or question marks
(#65) No space found before comment text; expected "// If they don't have permission don't show it" but found "//If they don't have permission don't show it"
(#77) Expected "} else {\n"; found "}else{\n"
(#81) Expected 1 space before "=>"; 0 found
(#81) Expected 1 space after "=>"; 0 found
(#92) Inline comments must start with a capital letter, digit or 3-dots sequence
(#92) Inline comments must end in full-stops, exclamation marks, or question marks
(#92) No space found before comment text; expected "// init our return value" but found "//init our return value"
(#93) Expected 1 space before "="; 0 found
(#93) Expected 1 space after "="; 0 found
(#94) Inline comments must start with a capital letter, digit or 3-dots sequence
(#94) Inline comments must end in full-stops, exclamation marks, or question marks
(#94) No space found before comment text; expected "// generico specific" but found "//generico specific"
(#97) Inline comments must start with a capital letter, digit or 3-dots sequence
(#97) Inline comments must end in full-stops, exclamation marks, or question marks
(#97) No space found before comment text; expected "// get the no. of templates" but found "//get the no. of templates"
(#103) Inline comments must start with a capital letter, digit or 3-dots sequence
(#103) Inline comments must end in full-stops, exclamation marks, or question marks
(#103) No space found before comment text; expected "// put our template into a form thats easy to process in JS" but found "//put our template into a form thats easy to process in JS"
(#114) Inline comments must start with a capital letter, digit or 3-dots sequence
(#114) Inline comments must end in full-stops, exclamation marks, or question marks
(#114) No space found before comment text; expected "// stash the key and name for this template" but found "//stash the key and name for this template"
(#123) Inline comments must start with a capital letter, digit or 3-dots sequence
(#123) Inline comments must end in full-stops, exclamation marks, or question marks
(#123) No space found before comment text; expected "// instructions" but found "//instructions"
(#124) Expected 1 space after "="; 0 found
(#124) Line exceeds 132 characters; contains 150 characters
(#124) Inline comments must start with a capital letter, digit or 3-dots sequence
(#124) Inline comments must end in full-stops, exclamation marks, or question marks
(#124) This comment is 67% valid code; is this commented out code?
(#126) Inline comments must start with a capital letter, digit or 3-dots sequence
(#126) Inline comments must end in full-stops, exclamation marks, or question marks
(#126) No space found before comment text; expected "// stash the defaults for this template" but found "//stash the defaults for this template"
(#129) No space found before comment text; expected "// NB each of the $allvariables contains an array of variables (not a string)" but found "//NB each of the $allvariables contains an array of variables (not a string)"
(#130) No space found before comment text; expected "// there might be duplicates where the variable is used multiple times in a template" but found "//there might be duplicates where the variable is used multiple times in a template"
(#131) Inline comments must end in full-stops, exclamation marks, or question marks
(#131) No space found before comment text; expected "// se we uniqu'ify it. That makes it look complicated. But we are just removing doubles" but found "//se we uniqu'ify it. That makes it look complicated. But we are just removing doubles"
(#135) Short array syntax must be used to define arrays
(#137) Inline comments must start with a capital letter, digit or 3-dots sequence
(#137) No space found before comment text; expected "// we need to reallocate array keys if the array size was changed in unique'ifying it" but found "//we need to reallocate array keys if the array size was changed in unique'ifying it"
(#138) No space found before comment text; expected "// we also take the opportunity to remove user variables, since they aren't needed here." but found "//we also take the opportunity to remove user variables, since they aren't needed here."
(#139) Inline comments must end in full-stops, exclamation marks, or question marks
(#139) No space found before comment text; expected "// NB DATASET can be referred to without the :" but found "//NB DATASET can be referred to without the :"
(#154) Expected 1 space after "="; 0 found
(#155) Expected "foreach (...) {\n"; found "foreach(...){\n"
(#157) Expected 1 space before "="; 0 found
(#157) Expected 1 space after "="; 0 found
(#158) Expected "if (...) {\n"; found "if(...) {\n"
(#158) Commas (,) must be followed by white space.
(#160) Expected 1 space before "="; 0 found
(#160) Expected 1 space after "="; 0 found
(#162) Variable "display_name" must not contain underscores.
(#162) Commas (,) must be followed by white space.
(#162) Commas (,) must be followed by white space.
(#163) Variable "display_name" must not contain underscores.
(#163) Commas (,) must be followed by white space.
(#163) Commas (,) must be followed by white space.
(#163) Variable "display_name" must not contain underscores.
(#164) Variable "display_name" must not contain underscores.
(#164) Expected 1 space after "="; 0 found
(#164) Variable "display_name" must not contain underscores.
(#165) Expected 1 space before "=>"; 0 found
(#165) Expected 1 space after "=>"; 0 found
(#165) Commas (,) must be followed by white space.
(#165) Expected 1 space before "=>"; 0 found
(#165) Expected 1 space after "=>"; 0 found
(#165) Expected 1 space before "=>"; 0 found
(#165) Expected 1 space after "=>"; 0 found
(#165) Expected 1 space before "=>"; 0 found
(#165) Expected 1 space after "=>"; 0 found
(#165) Variable "display_name" must not contain underscores.
(#168) Inline comments must start with a capital letter, digit or 3-dots sequence
(#168) No space found before comment text; expected "// set the template index so we can find it easily later." but found "//set the template index so we can find it easily later."
(#170) Functions must not contain multiple empty lines in a row; found 2 empty lines
(#173) Expected 1 space before "="; 0 found
(#173) Expected 1 space after "="; 0 found
(#186) Short array syntax must be used to define arrays
(#191) Short array syntax must be used to define arrays
(#195) Missing docblock for function fetch_widget_properties
(#196) No space found before comment text; expected "// Now we just have our properties string" but found "//Now we just have our properties string"
(#197) No space found before comment text; expected "// Lets run our regular expression over them" but found "//Lets run our regular expression over them"
(#198) No space found before comment text; expected "// string should be property=value,property=value" but found "//string should be property=value,property=value"
(#199) Inline comments must end in full-stops, exclamation marks, or question marks
(#199) No space found before comment text; expected "// got this regexp from http://stackoverflow.com/questions/168171/regular-expression-for-parsing-name-value-pairs" but found "//got this regexp from http://stackoverflow.com/questions/168171/regular-expression-for-parsing-name-value-pairs"
(#201) Short array syntax must be used to define arrays
(#203) Inline comments must start with a capital letter, digit or 3-dots sequence
(#203) No space found before comment text; expected "// here we match the filter string and split into name array (matches[1]) and value array (matches[2])" but found "//here we match the filter string and split into name array (matches[1]) and value array (matches[2])"
(#204) No space found before comment text; expected "// we then add those to a name value array." but found "//we then add those to a name value array."
(#205) Short array syntax must be used to define arrays
(#209) Inline comments must start with a capital letter, digit or 3-dots sequence
(#209) Inline comments must end in full-stops, exclamation marks, or question marks
(#209) This comment is 62% valid code; is this commented out code?
(#211) Inline comments must start with a capital letter, digit or 3-dots sequence
(#211) No space found before comment text; expected "// this could be done better, I am sure. WE are removing the quotes from start and end" but found "//this could be done better, I am sure. WE are removing the quotes from start and end"
(#212) Inline comments must end in full-stops, exclamation marks, or question marks
(#212) No space found before comment text; expected "// this wil however remove multiple quotes id they exist at start and end. NG really" but found "//this wil however remove multiple quotes id they exist at start and end. NG really"
lib/editor/tiny/plugins/generico/classes/privacy/provider.php
(#34) There must not be a space before the colon in a return type declaration
lib/editor/tiny/plugins/generico/db/access.php
(#1) End of line character is invalid; expected "\n" but found "\r\n"
(#3) Line 2 of the opening comment must start "//".
(#8) Line 7 of the opening comment must start "//".
(#13) Line 12 of the opening comment must start "//".
(#27) Short array syntax must be used to define arrays
(#29) Short array syntax must be used to define arrays
(#32) Short array syntax must be used to define arrays
(#38) There should be a comma after the last array item in a multi-line array.
(#39) There should be a comma after the last array item in a multi-line array.
(#47) There should be a comma after the last array item in a multi-line array.
lib/editor/tiny/plugins/generico/lang/en/tiny_generico.php
(#33) The string key "generico:visible" is not in the correct order, it should be before "privacy:metadata"
(#34) The string key "generico:use" is not in the correct order, it should be before "generico:visible"
(#35) The string key "creategenerico" is not in the correct order, it should be before "generico:use"
(#37) The string key "browse" is not in the correct order, it should be before "settings"
(#39) The string key "nothingtoinsert" is not in the correct order, it should be before "visible"
(#40) The string key "dialogtitle" is not in the correct order, it should be before "nothingtoinsert"
(#42) The string key "cancel" is not in the correct order, it should be before "insert"
(#44) The string key "defaultflavor" is not in the correct order, it should be before "enterflavor"
(#47) The string key "chooseinsert" is not in the correct order, it should be before "nofieldsheader"
(#48) The string key "generico:visible" is duplicated
(#49) The string key "privacy:metadata" is duplicated
(#50) The string key "insert" is duplicated
(#51) The string key "back" is not in the correct order, it should be before "chooseinsert"
lib/editor/tiny/plugins/generico/version.php
(#30) Inline comments must end in full-stops, exclamation marks, or question marks
(#30) No space found before comment text; expected "// Moodle 4.1.0" but found "//Moodle 4.1.0"

Javascript coding style problems

(7 errors, 104 warnings)

This section shows the coding style problems detected in the code by eslint [More info]

lib/editor/tiny/plugins/generico/amd/src/commands.js
(#31) Identifier 'widget_selector' is not in camel case. (camelcase)
(#38) 'handleAction' is assigned a value but never used. (no-unused-vars)
(#70) Expected space(s) after "if". (keyword-spacing)
(#76) Identifier 'widget_selector' is not in camel case. (camelcase)
(#84) Identifier 'widget_selector' is not in camel case. (camelcase)
lib/editor/tiny/plugins/generico/amd/src/configuration.js
(#24) Expected space(s) before "from". (keyword-spacing)
lib/editor/tiny/plugins/generico/amd/src/plugin.js
(#33) Promise executor functions should not be async. (no-async-promise-executor)
lib/editor/tiny/plugins/generico/amd/src/widget_selector.js
(#29) 'prefetchStrings' is defined but never used. (no-unused-vars)
(#29) 'prefetchTemplates' is defined but never used. (no-unused-vars)
(#51) A space is required after ','. (comma-spacing)
(#55) Comments should not begin with a lowercase character. (capitalized-comments)
(#55) Expected space or tab after '//' in comment. (spaced-comment)
(#60) Missing space before opening brace. (space-before-blocks)
(#74) Missing space before opening brace. (space-before-blocks)
(#82) Operator '=' must be spaced. (space-infix-ops)
(#85) Comments should not begin with a lowercase character. (capitalized-comments)
(#85) Expected space or tab after '//' in comment. (spaced-comment)
(#87) Expected space or tab after '//' in comment. (spaced-comment)
(#93) Expected space or tab after '//' in comment. (spaced-comment)
(#96) Comments should not begin with a lowercase character. (capitalized-comments)
(#96) Expected space or tab after '//' in comment. (spaced-comment)
(#98) 'templateindex' declared on line 114 column 21 is used outside of binding context. (block-scoped-var)
(#99) 'widget' declared on line 115 column 21 is used outside of binding context. (block-scoped-var)
(#99) 'templateindex' declared on line 114 column 21 is used outside of binding context. (block-scoped-var)
(#101) 'widget' declared on line 115 column 21 is used outside of binding context. (block-scoped-var)
(#102) 'templateindex' declared on line 114 column 21 is used outside of binding context. (block-scoped-var)
(#106) Comments should not begin with a lowercase character. (capitalized-comments)
(#106) Expected space or tab after '//' in comment. (spaced-comment)
(#107) 'widget' declared on line 115 column 21 is used outside of binding context. (block-scoped-var)
(#111) Expected space or tab after '//' in comment. (spaced-comment)
(#114) 'templateindex' is already defined. (no-redeclare)
(#114) 'templateindex' declared on line 98 column 21 is used outside of binding context. (block-scoped-var)
(#115) 'widget' is already defined. (no-redeclare)
(#115) 'widget' declared on line 99 column 21 is used outside of binding context. (block-scoped-var)
(#115) 'templateindex' declared on line 98 column 21 is used outside of binding context. (block-scoped-var)
(#116) 'widget' declared on line 99 column 21 is used outside of binding context. (block-scoped-var)
(#117) 'templateindex' declared on line 98 column 21 is used outside of binding context. (block-scoped-var)
(#121) Comments should not begin with a lowercase character. (capitalized-comments)
(#121) Expected space or tab after '//' in comment. (spaced-comment)
(#122) 'widget' declared on line 99 column 21 is used outside of binding context. (block-scoped-var)
(#123) Comments should not begin with a lowercase character. (capitalized-comments)
(#123) Expected space or tab after '//' in comment. (spaced-comment)
(#125) Comments should not begin with a lowercase character. (capitalized-comments)
(#125) Expected space or tab after '//' in comment. (spaced-comment)
(#130) Expected space or tab after '//' in comment. (spaced-comment)
(#134) Comments should not begin with a lowercase character. (capitalized-comments)
(#134) Expected space or tab after '//' in comment. (spaced-comment)
(#135) 'widget' declared on line 99 column 21 is used outside of binding context. (block-scoped-var)
(#135) 'widget' declared on line 115 column 21 is used outside of binding context. (block-scoped-var)
(#138) Comments should not begin with a lowercase character. (capitalized-comments)
(#138) Expected space or tab after '//' in comment. (spaced-comment)
(#140) Comments should not begin with a lowercase character. (capitalized-comments)
(#140) Expected space or tab after '//' in comment. (spaced-comment)
(#166) Each then() should return a value or throw (promise/always-return)
(#166) Unexpected space before function parentheses. (space-before-function-paren)
(#166) 'js' is defined but never used. (no-unused-vars)
(#171) Comments should not begin with a lowercase character. (capitalized-comments)
(#171) Expected space or tab after '//' in comment. (spaced-comment)
(#172) Expected space or tab after '//' in comment. (spaced-comment)
(#173) Expected space or tab after '//' in comment. (spaced-comment)
(#177) Comments should not begin with a lowercase character. (capitalized-comments)
(#177) Expected space or tab after '//' in comment. (spaced-comment)
(#180) Comments should not begin with a lowercase character. (capitalized-comments)
(#180) Expected space or tab after '//' in comment. (spaced-comment)
(#181) Operator '=' must be spaced. (space-infix-ops)
(#182) Operator '=' must be spaced. (space-infix-ops)
(#184) Unexpected space before function parentheses. (space-before-function-paren)
(#184) Requires a space after '{'. (block-spacing)
(#184) Statement inside of curly braces should be on next line. (brace-style)
(#184) Missing space before opening brace. (space-before-blocks)
(#184) Requires a space before '}'. (block-spacing)
(#184) Closing curly brace should be on the same line as opening curly brace or on the line after the previous block. (brace-style)
(#199) Comments should not begin with a lowercase character. (capitalized-comments)
(#199) Expected space or tab after '//' in comment. (spaced-comment)
(#202) Comments should not begin with a lowercase character. (capitalized-comments)
(#202) Expected space or tab after '//' in comment. (spaced-comment)
(#205) Comments should not begin with a lowercase character. (capitalized-comments)
(#205) Expected space or tab after '//' in comment. (spaced-comment)
(#206) Operator '=' must be spaced. (space-infix-ops)
(#206) Multiple spaces found before '+'. (no-multi-spaces)
(#206) Multiple spaces found before ''px''. (no-multi-spaces)
(#207) Operator '=' must be spaced. (space-infix-ops)
(#221) 'thedefaults' is assigned a value but never used. (no-unused-vars)
(#224) Comments should not begin with a lowercase character. (capitalized-comments)
(#224) Expected space or tab after '//' in comment. (spaced-comment)
(#227) Comments should not begin with a lowercase character. (capitalized-comments)
(#227) Expected space or tab after '//' in comment. (spaced-comment)
(#229) Operator '=' must be spaced. (space-infix-ops)
(#230) Operator '=' must be spaced. (space-infix-ops)
(#231) Comments should not begin with a lowercase character. (capitalized-comments)
(#231) Expected space or tab after '//' in comment. (spaced-comment)
(#232) Expected space(s) after "if". (keyword-spacing)
(#234) Comments should not begin with a lowercase character. (capitalized-comments)
(#234) Expected space or tab after '//' in comment. (spaced-comment)
(#235) Expected space(s) before "else". (keyword-spacing)
(#235) Expected space(s) after "else". (keyword-spacing)
(#241) Expected space(s) after "if". (keyword-spacing)
(#241) Operator '!==' must be spaced. (space-infix-ops)
(#241) Missing space before opening brace. (space-before-blocks)
(#246) Comments should not begin with a lowercase character. (capitalized-comments)
(#246) Expected space or tab after '//' in comment. (spaced-comment)
(#249) Comments should not begin with a lowercase character. (capitalized-comments)
(#249) Expected space or tab after '//' in comment. (spaced-comment)
(#258) More than 2 blank lines not allowed. (no-multiple-empty-lines)
(#293) Trailing spaces not allowed. (no-trailing-spaces)
(#294) Comments should not begin with a lowercase character. (capitalized-comments)
(#294) Expected space or tab after '//' in comment. (spaced-comment)
(#297) Comments should not begin with a lowercase character. (capitalized-comments)
(#297) Expected space or tab after '//' in comment. (spaced-comment)
(#322) Comments should not begin with a lowercase character. (capitalized-comments)
(#322) Expected space or tab after '//' in comment. (spaced-comment)

CSS problems

(3 errors, 0 warnings)

This section shows CSS problems detected by stylelint [More info]

lib/editor/tiny/plugins/generico/styles.css
(#34) Expected single space before "{" (block-opening-brace-space-before)
(#17) Expected indentation of 4 spaces (indentation)
(#18) Expected indentation of 4 spaces (indentation)

PHPDocs style problems

(1 errors, 0 warnings)

This section shows the phpdocs problems detected in the code by local_moodlecheck [More info]

lib/editor/tiny/plugins/generico/classes/plugininfo.php
(#182) Phpdocs for function plugininfo::fetch_widget_variables has incomplete parameters list

Update savepoints problems

(0 errors, 0 warnings)

This section shows problems detected with the handling of upgrade savepoints [More info]


Third party library modification problems

(0 errors, 0 warnings)

This section shows problems detected with the modification of third party libraries [More info]


grunt changes

(1 errors, 1 warnings)

This section shows files built by grunt and not commited [More info]

Problems running grunt
Task "eslint:amd" failed. Use --force to continue.

shifter problems

(0 errors, 0 warnings)

This section shows problems detected by shifter [More info]


Mustache template problems

(0 errors, 2 warnings)

This section shows problems detected in mustache templates [More info]

lib/editor/tiny/plugins/generico/templates/widgetoptions.mustache
(#1) Example context missing (@template section not found.)
(#1) HTML Validation info, line 4: Empty heading. (l-align"><h4 class="tiny_generico_widget_instructions"></h4>)
lib/editor/tiny/plugins/generico/templates/widgetselector.mustache
(#1) Example context missing (@template section not found.)

Gherkin .feature problems

(0 errors, 0 warnings)

This section shows problems detected in behat .feature files [More info]