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

(145 errors, 48 warnings)

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

blocks/openai_chat/api/completion.php
(#25) Import statements must not begin with a leading backslash
(#27) Expected login check (require_login, require_course_login, require_admin, admin_externalpage_setup) following config inclusion. None found.
(#45) Variable "block_id" must not contain underscores.
(#46) Variable "thread_id" must not contain underscores.
(#49) Inline comments must end in full-stops, exclamation marks, or question marks
(#50) Variable "instance_record" must not contain underscores.
(#50) Variable "block_id" must not contain underscores.
(#51) Variable "instance_record" must not contain underscores.
(#53) Function print_error() has been deprecated; use throw new moodle_exception() (using lang strings only if meant to be shown to final user)() instead
(#56) Variable "instance_record" must not contain underscores.
(#64) Variable "block_settings" must not contain underscores.
(#65) Variable "setting_names" must not contain underscores.
(#66) Whitespace found at end of line
(#69) Whitespace found at end of line
(#70) Whitespace found at end of line
(#71) Whitespace found at end of line
(#72) Whitespace found at end of line
(#73) Whitespace found at end of line
(#74) Whitespace found at end of line
(#75) Whitespace found at end of line
(#76) Whitespace found at end of line
(#78) There should be a comma after the last array item in a multi-line array.
(#80) Variable "setting_names" must not contain underscores.
(#82) Variable "block_settings" must not contain underscores.
(#84) Variable "block_settings" must not contain underscores.
(#88) Variable "engine_class" must not contain underscores.
(#90) Variable "api_type" must not contain underscores.
(#91) Variable "api_type" must not contain underscores.
(#92) Variable "engine_class" must not contain underscores.
(#95) Variable "block_settings" must not contain underscores.
(#96) Variable "block_settings" must not contain underscores.
(#101) Variable "engine_class" must not contain underscores.
(#104) Variable "engine_class" must not contain underscores.
(#104) Variable "block_settings" must not contain underscores.
(#104) Variable "thread_id" must not contain underscores.
blocks/openai_chat/api/thread.php
(#25) Expected login check (require_login, require_course_login, require_admin, admin_externalpage_setup) following config inclusion. None found.
(#33) Variable "thread_id" must not contain underscores.
(#37) Short array syntax must be used to define arrays
(#38) Short array syntax must be used to define arrays
(#41) There should be a comma after the last array item in a multi-line array.
(#45) Variable "thread_id" must not contain underscores.
(#52) Variable "api_response" must not contain underscores.
(#53) Variable "message_list" must not contain underscores.
(#55) Variable "message_list" must not contain underscores.
(#56) Variable "api_response" must not contain underscores.
(#59) There should be a comma after the last array item in a multi-line array.
(#63) Variable "api_response" must not contain underscores.
(#63) Variable "api_response" must not contain underscores.
(#64) Variable "api_response" must not contain underscores.
blocks/openai_chat/block_openai_chat.php
(#45) Inline comments must end in full-stops, exclamation marks, or question marks
(#48) Line exceeds maximum limit of 180 characters; contains 183 characters
(#53) There should be a comma after the last array item in a multi-line array.
(#69) Inline comments must end in full-stops, exclamation marks, or question marks
(#70) Line exceeds maximum limit of 180 characters; contains 183 characters
(#71) Line exceeds 132 characters; contains 163 characters
(#73) Inline comments must end in full-stops, exclamation marks, or question marks
(#75) Line exceeds 132 characters; contains 159 characters
(#76) Line exceeds 132 characters; contains 134 characters
(#104) Line exceeds 132 characters; contains 143 characters
blocks/openai_chat/classes/completion.php
(#23) Expected 1 space before asterisk; 0 found
(#26) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#55) Variable "block_settings" must not contain underscores.
(#56) Inline comments must end in full-stops, exclamation marks, or question marks
(#62) Inline comments must end in full-stops, exclamation marks, or question marks
(#77) Inline comments must end in full-stops, exclamation marks, or question marks
(#79) Variable "block_settings" must not contain underscores.
(#89) Variable "block_settings" must not contain underscores.
(#98) Variable "default_value" must not contain underscores.
(#101) Variable "default_value" must not contain underscores.
(#108) Whitespace found at end of line
(#112) Whitespace found at end of line
(#114) Whitespace found at end of line
(#118) Line indented incorrectly; expected 8 spaces, found 12
(#118) Closing brace indented incorrectly; expected 8 spaces, found 12
(#121) File must end with a newline character
blocks/openai_chat/classes/completion/assistant.php
(#23) Expected 1 space before asterisk; 0 found
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Member variable "thread_id" must not contain underscores.
(#34) Variable "block_settings" must not contain underscores.
(#34) Variable "thread_id" must not contain underscores.
(#35) Variable "block_settings" must not contain underscores.
(#37) Inline comments must end in full-stops, exclamation marks, or question marks
(#38) Variable "thread_id" must not contain underscores.
(#39) Variable "thread_id" must not contain underscores.
(#41) Variable "thread_id" must not contain underscores.
(#45) Line exceeds 132 characters; contains 133 characters
(#55) Short array syntax must be used to define arrays
(#56) Short array syntax must be used to define arrays
(#59) There should be a comma after the last array item in a multi-line array.
(#72) There should be a comma after the last array item in a multi-line array.
(#76) Short array syntax must be used to define arrays
(#77) Short array syntax must be used to define arrays
(#80) There should be a comma after the last array item in a multi-line array.
(#85) Whitespace found at end of line
(#107) Short array syntax must be used to define arrays
(#108) Short array syntax must be used to define arrays
(#111) There should be a comma after the last array item in a multi-line array.
(#116) Whitespace found at end of line
(#125) Variable "run_id" must not contain underscores.
(#126) Variable "run_completed" must not contain underscores.
(#127) Variable "run_completed" must not contain underscores.
(#128) Variable "run_completed" must not contain underscores.
(#128) Variable "run_id" must not contain underscores.
(#133) Short array syntax must be used to define arrays
(#134) Short array syntax must be used to define arrays
(#137) There should be a comma after the last array item in a multi-line array.
(#146) There should be a comma after the last array item in a multi-line array.
(#150) Variable "run_id" must not contain underscores.
(#152) Short array syntax must be used to define arrays
(#153) Short array syntax must be used to define arrays
(#156) There should be a comma after the last array item in a multi-line array.
(#160) Variable "run_id" must not contain underscores.
(#162) Whitespace found at end of line
blocks/openai_chat/classes/completion/chat.php
(#23) Expected 1 space before asterisk; 0 found
(#28) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#32) Variable "block_settings" must not contain underscores.
(#32) Variable "thread_id" must not contain underscores.
(#33) Variable "block_settings" must not contain underscores.
(#37) Line exceeds 132 characters; contains 133 characters
(#47) Variable "history_json" must not contain underscores.
(#48) Variable "history_json" must not contain underscores.
(#49) Variable "history_json" must not contain underscores.
(#51) Variable "history_json" must not contain underscores.
(#53) Variable "history_json" must not contain underscores.
(#82) There should be a comma after the last array item in a multi-line array.
(#86) Short array syntax must be used to define arrays
(#87) Short array syntax must be used to define arrays
(#89) There should be a comma after the last array item in a multi-line array.
(#98) There should be a comma after the last array item in a multi-line array.
blocks/openai_chat/db/access.php
(#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
(#33) There should be a comma after the last array item in a multi-line array.
(#36) There should be a comma after the last array item in a multi-line array.
(#39) Short array syntax must be used to define arrays
(#44) Short array syntax must be used to define arrays
(#46) There should be a comma after the last array item in a multi-line array.
(#49) There should be a comma after the last array item in a multi-line array.
blocks/openai_chat/edit_form.php
(#25) Expected MOODLE_INTERNAL check or config.php inclusion. Change in global state detected.
(#30) Variable "block_id" must not contain underscores.
(#43) Inline comments must end in full-stops, exclamation marks, or question marks
(#46) Variable "block_id" must not contain underscores.
(#46) Line exceeds 132 characters; contains 146 characters
(#64) Whitespace found at end of line
(#79) Inline comments must end in full-stops, exclamation marks, or question marks
(#85) Whitespace found at end of line
(#91) Whitespace found at end of line
(#96) Whitespace found at end of line
(#101) Whitespace found at end of line
(#103) Whitespace found at end of line
(#108) Whitespace found at end of line
(#113) Whitespace found at end of line
(#118) Whitespace found at end of line
(#123) Whitespace found at end of line
(#128) Whitespace found at end of line
(#133) Whitespace found at end of line
blocks/openai_chat/lib.php
(#25) Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected.
(#28) Variable "stored_type" must not contain underscores.
(#29) Variable "stored_type" must not contain underscores.
(#30) Variable "stored_type" must not contain underscores.
(#32) Whitespace found at end of line
(#36) Variable "block_id" must not contain underscores.
(#39) Variable "block_id" must not contain underscores.
(#42) Variable "instance_record" must not contain underscores.
(#42) Variable "block_id" must not contain underscores.
(#43) Variable "instance_record" must not contain underscores.
(#52) Short array syntax must be used to define arrays
(#53) Short array syntax must be used to define arrays
(#56) There should be a comma after the last array item in a multi-line array.
(#62) Variable "assistant_array" must not contain underscores.
(#64) Variable "assistant_array" must not contain underscores.
(#67) Variable "assistant_array" must not contain underscores.
(#95) There should be a comma after the last array item in a multi-line array.
(#97) File must end with a newline character
blocks/openai_chat/settings.php
(#30) Variable "assistant_array" must not contain underscores.
(#74) Inline comments must end in full-stops, exclamation marks, or question marks
(#78) Whitespace found at end of line
(#83) Variable "assistant_array" must not contain underscores.
(#88) Variable "assistant_array" must not contain underscores.
(#88) Variable "assistant_array" must not contain underscores.
(#89) Variable "assistant_array" must not contain underscores.
(#96) Whitespace found at end of line
(#108) Inline comments must end in full-stops, exclamation marks, or question marks
(#111) Whitespace found at end of line
(#123) Whitespace found at end of line
(#134) Inline comments must end in full-stops, exclamation marks, or question marks
(#137) Whitespace found at end of line
(#149) Empty IF statement detected
(#159) Whitespace found at end of line
(#167) Whitespace found at end of line
(#175) Whitespace found at end of line
(#183) Whitespace found at end of line
(#191) Whitespace found at end of line

Javascript coding style problems

(109 errors, 16 warnings)

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

blocks/openai_chat/amd/src/lib.js
(#1) Missing semicolon. (@babel/semi)
(#2) Missing semicolon. (@babel/semi)
(#6) ["blockId"] is better written in dot notation. (dot-notation)
(#6) Missing semicolon. (@babel/semi)
(#7) Identifier 'api_type' is not in camel case. (camelcase)
(#7) ["api_type"] is better written in dot notation. (dot-notation)
(#7) Missing semicolon. (@babel/semi)
(#8) ["persistConvo"] is better written in dot notation. (dot-notation)
(#8) Missing semicolon. (@babel/semi)
(#12) Identifier 'api_type' is not in camel case. (camelcase)
(#13) 'chatData' is not defined. (no-undef)
(#13) Missing semicolon. (@babel/semi)
(#14) 'chatData' is not defined. (no-undef)
(#15) 'chatData' is not defined. (no-undef)
(#15) 'chatData' is not defined. (no-undef)
(#15) Missing semicolon. (@babel/semi)
(#16) 'chatData' is not defined. (no-undef)
(#16) 'chatData' is not defined. (no-undef)
(#16) ["threadId"] is better written in dot notation. (dot-notation)
(#17) 'chatData' is not defined. (no-undef)
(#17) ["threadId"] is better written in dot notation. (dot-notation)
(#20) Each then() should return a value or throw (promise/always-return)
(#21) Missing semicolon. (@babel/semi)
(#25) 'error' is defined but never used. (no-unused-vars)
(#26) 'chatData' is not defined. (no-undef)
(#26) Missing semicolon. (@babel/semi)
(#27) 'chatData' is not defined. (no-undef)
(#28) Missing semicolon. (@babel/semi)
(#31) 'chatData' is not defined. (no-undef)
(#31) Missing semicolon. (@babel/semi)
(#35) 'chatData' is not defined. (no-undef)
(#35) Missing semicolon. (@babel/semi)
(#37) 'chatData' is not defined. (no-undef)
(#42) Missing semicolon. (@babel/semi)
(#43) Missing semicolon. (@babel/semi)
(#44) Missing semicolon. (@babel/semi)
(#46) Missing semicolon. (@babel/semi)
(#47) 'e' is defined but never used. (no-unused-vars)
(#48) Missing semicolon. (@babel/semi)
(#50) Missing semicolon. (@babel/semi)
(#51) Missing semicolon. (@babel/semi)
(#52) Missing semicolon. (@babel/semi)
(#54) Missing semicolon. (@babel/semi)
(#56) 'e' is defined but never used. (no-unused-vars)
(#57) Missing semicolon. (@babel/semi)
(#58) Missing semicolon. (@babel/semi)
(#71) Expected catch,fail,always() or return (promise/catch-or-return)
(#71) Each then() should return a value or throw (promise/always-return)
(#76) Missing semicolon. (@babel/semi)
(#84) Missing semicolon. (@babel/semi)
(#85) Trailing spaces not allowed. (no-trailing-spaces)
(#86) Missing semicolon. (@babel/semi)
(#87) Missing semicolon. (@babel/semi)
(#89) Missing semicolon. (@babel/semi)
(#92) Missing semicolon. (@babel/semi)
(#93) Missing semicolon. (@babel/semi)
(#94) Missing semicolon. (@babel/semi)
(#96) Missing semicolon. (@babel/semi)
(#98) Missing semicolon. (@babel/semi)
(#100) Missing semicolon. (@babel/semi)
(#101) Missing semicolon. (@babel/semi)
(#103) Missing JSDoc @param "blockId" declaration. (jsdoc/require-param)
(#107) 'chatData' is not defined. (no-undef)
(#107) Missing semicolon. (@babel/semi)
(#108) 'chatData' is not defined. (no-undef)
(#109) 'chatData' is not defined. (no-undef)
(#109) 'chatData' is not defined. (no-undef)
(#109) Missing semicolon. (@babel/semi)
(#110) 'chatData' is not defined. (no-undef)
(#111) 'chatData' is not defined. (no-undef)
(#111) Missing semicolon. (@babel/semi)
(#112) 'chatData' is not defined. (no-undef)
(#115) Missing semicolon. (@babel/semi)
(#116) Missing semicolon. (@babel/semi)
(#124) Identifier 'api_type' is not in camel case. (camelcase)
(#125) Missing semicolon. (@babel/semi)
(#126) Missing semicolon. (@babel/semi)
(#129) Identifier 'api_type' is not in camel case. (camelcase)
(#130) Missing semicolon. (@babel/semi)
(#132) Missing semicolon. (@babel/semi)
(#134) ["threadId"] is better written in dot notation. (dot-notation)
(#134) Missing semicolon. (@babel/semi)
(#137) Comments should not begin with a lowercase character. (capitalized-comments)
(#138) Missing semicolon. (@babel/semi)
(#140) Trailing spaces not allowed. (no-trailing-spaces)
(#142) Missing semicolon. (@babel/semi)
(#144) Missing semicolon. (@babel/semi)
(#145) Missing semicolon. (@babel/semi)
(#146) Missing semicolon. (@babel/semi)
(#147) Missing semicolon. (@babel/semi)
(#160) Missing semicolon. (@babel/semi)
(#161) Missing semicolon. (@babel/semi)
(#162) Missing semicolon. (@babel/semi)
(#165) Missing semicolon. (@babel/semi)
(#167) Missing semicolon. (@babel/semi)
(#171) Each then() should return a value or throw (promise/always-return)
(#172) Missing semicolon. (@babel/semi)
(#174) ["threadId"] is better written in dot notation. (dot-notation)
(#174) Missing semicolon. (@babel/semi)
(#178) Unexpected console statement. (no-console)
(#178) Missing semicolon. (@babel/semi)
(#179) Missing semicolon. (@babel/semi)
(#181) Missing semicolon. (@babel/semi)
(#184) Unexpected console statement. (no-console)
(#184) Missing semicolon. (@babel/semi)
(#185) Missing semicolon. (@babel/semi)
(#186) Missing semicolon. (@babel/semi)
(#187) Missing semicolon. (@babel/semi)
(#188) Missing semicolon. (@babel/semi)
(#195) Missing semicolon. (@babel/semi)
(#198) Missing semicolon. (@babel/semi)
(#201) 'userName' is not defined. (no-undef)
(#201) Missing semicolon. (@babel/semi)
(#203) 'assistantName' is not defined. (no-undef)
(#203) Missing semicolon. (@babel/semi)
(#205) Missing semicolon. (@babel/semi)
(#206) Missing semicolon. (@babel/semi)
(#208) Missing semicolon. (@babel/semi)
(#209) Missing semicolon. (@babel/semi)
blocks/openai_chat/amd/src/settings.js
(#2) 'e' is defined but never used. (no-unused-vars)
(#4) Missing semicolon. (@babel/semi)
(#5) Missing semicolon. (@babel/semi)
(#6) Missing semicolon. (@babel/semi)
(#7) Missing semicolon. (@babel/semi)
(#8) Missing semicolon. (@babel/semi)

CSS problems

(0 errors, 0 warnings)

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


PHPDocs style problems

(31 errors, 10 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::$message is not documented
(#32) Variable completion::$history is not documented
(#34) Variable completion::$assistantname is not documented
(#35) Variable completion::$username is not documented
(#36) Variable completion::$prompt is not documented
(#37) Variable completion::$sourceoftruth is not documented
(#38) Variable completion::$model is not documented
(#39) Variable completion::$temperature is not documented
(#40) Variable completion::$maxlength is not documented
(#41) Variable completion::$topp is not documented
(#42) Variable completion::$frequency is not documented
(#43) Variable completion::$presence is not documented
(#45) Variable completion::$assistant is not documented
(#46) Variable completion::$instructions is not documented
(#50) Phpdocs for function completion::__construct has incomplete parameters list
(#94) Phpdocs for function completion::get_setting has incomplete parameters list
(#108) Phpdocs for function completion::build_source_of_truth has incomplete parameters list
blocks/openai_chat/classes/completion/assistant.php
(#30) Class assistant is not documented
(#34) Function assistant::__construct is not documented
(#53) Function assistant::create_thread is not documented
(#69) Function assistant::add_message_to_thread is not documented
(#150) Function assistant::check_run_status is not documented
(#32) Variable assistant::$thread_id is not documented
(#44) Phpdocs for function assistant::create_completion has incomplete parameters list
blocks/openai_chat/classes/completion/chat.php
(#30) Class chat is not documented
(#32) Function chat::__construct is not documented
(#36) Phpdocs for function chat::create_completion has incomplete parameters list
(#69) 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
(#27) Class block_openai_chat_edit_form is not documented
(#29) Function block_openai_chat_edit_form::specific_definition is not documented
blocks/openai_chat/lib.php
(#27) Function get_type_to_display is not documented
(#36) Function fetch_assistants_array is not documented
(#70) Function get_models 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 "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, 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]