Prechecker results: error


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

(30 errors, 11 warnings)

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

blocks/openai_chat/api/completion.php
(#27) Expected login check (require_login, require_course_login, require_admin, admin_externalpage_setup) following config inclusion. None found.
(#70) Variable "engine_class" must not contain underscores.
(#71) Variable "engine_class" must not contain underscores.
blocks/openai_chat/block_openai_chat.php
(#63) Line exceeds maximum limit of 180 characters; contains 183 characters
(#64) Line exceeds 132 characters; contains 163 characters
(#87) Line exceeds 132 characters; contains 136 characters
blocks/openai_chat/classes/completion.php
(#23) Expected 1 space(s) before asterisk; 0 found
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#66) Variable "default_value" must not contain underscores.
(#69) Variable "default_value" must not contain underscores.
(#76) Whitespace found at end of line
(#80) Whitespace found at end of line
(#82) Whitespace found at end of line
(#86) Line indented incorrectly; expected 8 spaces, found 12
(#86) Closing brace indented incorrectly; expected 8 spaces, found 12
(#89) File must end with a newline character
blocks/openai_chat/classes/completion/basic.php
(#23) Expected 1 space(s) before asterisk; 0 found
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Possible useless method overriding detected
(#37) Line exceeds 132 characters; contains 133 characters
(#46) Variable "history_string" must not contain underscores.
(#47) Variable "history_string" must not contain underscores.
(#49) Variable "history_string" must not contain underscores.
(#57) Variable "history_string" must not contain underscores.
(#59) Variable "history_string" must not contain underscores.
(#61) Variable "history_string" must not contain underscores.
(#68) Variable "history_string" must not contain underscores.
(#76) Variable "history_string" must not contain underscores.
(#96) File must end with a newline character
blocks/openai_chat/classes/completion/chat.php
(#23) Expected 1 space(s) before asterisk; 0 found
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Possible useless method overriding detected
(#37) Line exceeds 132 characters; contains 133 characters
(#46) Variable "history_json" must not contain underscores.
(#47) Variable "history_json" must not contain underscores.
(#48) Variable "history_json" must not contain underscores.
(#50) Variable "history_json" must not contain underscores.
(#52) Variable "history_json" must not contain underscores.
(#101) File must end with a newline character
blocks/openai_chat/settings.php
(#74) Inline comments must end in full-stops, exclamation marks, or question marks
(#77) Whitespace found at end of line

Javascript coding style problems

(39 errors, 3 warnings)

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

blocks/openai_chat/lib.js
(#1) Missing semicolon. (semi)
(#2) Missing semicolon. (semi)
(#4) 'init' is assigned a value but never used. (no-unused-vars)
(#7) Missing semicolon. (semi)
(#8) Missing semicolon. (semi)
(#9) Missing semicolon. (semi)
(#11) Missing semicolon. (semi)
(#24) Expected catch,fail() or return (promise/catch-or-return)
(#24) Each then() should return a value or throw (promise/always-return)
(#29) Missing semicolon. (semi)
(#37) Missing semicolon. (semi)
(#42) Missing semicolon. (semi)
(#43) Missing semicolon. (semi)
(#44) Missing semicolon. (semi)
(#51) Missing semicolon. (semi)
(#52) Missing semicolon. (semi)
(#53) Missing semicolon. (semi)
(#54) Missing semicolon. (semi)
(#55) Missing semicolon. (semi)
(#67) Missing semicolon. (semi)
(#68) Missing semicolon. (semi)
(#69) Missing semicolon. (semi)
(#72) Missing semicolon. (semi)
(#74) Missing semicolon. (semi)
(#78) Each then() should return a value or throw (promise/always-return)
(#79) Expected an assignment or function call and instead saw an expression. (no-unused-expressions)
(#81) Missing semicolon. (semi)
(#84) 'error' is defined but never used. (no-unused-vars)
(#85) Missing semicolon. (semi)
(#86) Missing semicolon. (semi)
(#87) Missing semicolon. (semi)
(#89) Missing semicolon. (semi)
(#96) Missing semicolon. (semi)
(#99) Missing semicolon. (semi)
(#102) 'userName' is not defined. (no-undef)
(#102) Missing semicolon. (semi)
(#104) 'assistantName' is not defined. (no-undef)
(#104) Missing semicolon. (semi)
(#106) Missing semicolon. (semi)
(#107) Missing semicolon. (semi)
(#109) Missing semicolon. (semi)
(#110) Missing semicolon. (semi)

CSS problems

(38 errors, 1 warnings)

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

blocks/openai_chat/styles.css
(#61) Expected newline before "}" (block-closing-brace-newline-before)
(#62) Expected newline before "}" (block-closing-brace-newline-before)
(#63) Expected newline before "}" (block-closing-brace-newline-before)
(#64) Expected newline before "}" (block-closing-brace-newline-before)
(#68) Expected newline before "}" (block-closing-brace-newline-before)
(#69) Expected newline before "}" (block-closing-brace-newline-before)
(#70) Expected newline before "}" (block-closing-brace-newline-before)
(#74) Expected newline before "}" (block-closing-brace-newline-before)
(#75) Expected newline before "}" (block-closing-brace-newline-before)
(#61) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#62) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#63) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#64) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#68) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#69) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#70) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#74) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#75) Expected single space before "}" of a single-line block (block-closing-brace-space-before)
(#61) Expected newline after "{" (block-opening-brace-newline-after)
(#62) Expected newline after "{" (block-opening-brace-newline-after)
(#63) Expected newline after "{" (block-opening-brace-newline-after)
(#64) Expected newline after "{" (block-opening-brace-newline-after)
(#68) Expected newline after "{" (block-opening-brace-newline-after)
(#69) Expected newline after "{" (block-opening-brace-newline-after)
(#70) Expected newline after "{" (block-opening-brace-newline-after)
(#74) Expected newline after "{" (block-opening-brace-newline-after)
(#75) Expected newline after "{" (block-opening-brace-newline-after)
(#61) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#62) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#63) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#64) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#68) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#69) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#70) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#74) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#75) Expected single space after "{" of a single-line block (block-opening-brace-space-after)
(#61) Expected no more than 1 declaration (declaration-block-single-line-max-declarations)
(#62) Expected no more than 1 declaration (declaration-block-single-line-max-declarations)
(#64) Unexpected unit (length-zero-no-unit)

PHPDocs style problems

(19 errors, 7 warnings)

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

blocks/openai_chat/block_openai_chat.php
(#25) Class block_openai_chat is not documented
(#26) Function block_openai_chat::init is not documented
(#30) Function block_openai_chat::has_config is not documented
(#34) Function block_openai_chat::specialization is not documented
(#40) Function block_openai_chat::get_content is not documented
blocks/openai_chat/classes/completion.php
(#28) Class completion is not documented
(#30) Variable completion::$apikey is not documented
(#31) Variable completion::$assistantname is not documented
(#32) Variable completion::$username is not documented
(#34) Variable completion::$prompt is not documented
(#35) Variable completion::$sourceoftruth is not documented
(#37) Variable completion::$model is not documented
(#38) Variable completion::$message is not documented
(#39) Variable completion::$history is not documented
(#43) Phpdocs for function completion::__construct has incomplete parameters list
(#62) Phpdocs for function completion::get_setting has incomplete parameters list
(#76) Phpdocs for function completion::build_source_of_truth has incomplete parameters list
blocks/openai_chat/classes/completion/basic.php
(#30) Class basic is not documented
(#32) Function basic::__construct is not documented
(#64) Phpdocs for function basic::make_api_call has incomplete parameters list
blocks/openai_chat/classes/completion/chat.php
(#30) Class chat is not documented
(#32) Function chat::__construct is not documented
(#68) Phpdocs for function chat::make_api_call has incomplete parameters list
blocks/openai_chat/classes/privacy/provider.php
(#27) Class provider is not documented
blocks/openai_chat/edit_form.php
(#25) Class block_openai_chat_edit_form is not documented
(#27) Function block_openai_chat_edit_form::specific_definition is not documented

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 "stylelint:css" 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, 0 warnings)

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


Gherkin .feature problems

(0 errors, 0 warnings)

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