Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/116521
Change subject: Add .scrutinizer.yml ...................................................................... Add .scrutinizer.yml This allows scrutinizer to run for mediawiki-core with a controlled set of checks running as we cant trigger more than 5000 issues if we want scrutinizer to work! Change-Id: I9ec25145239331f8d1ef4bab2a0b97a1949ef698 --- A .scrutinizer.yml 1 file changed, 301 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/116521/2 diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..df56b0a --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,301 @@ +# Scrutinizer config +# https://scrutinizer-ci.com/g/wikimedia/mediawiki-core/ +# Scrutinizer-ci.com has a limit of 5000 issues, hence we cant turn everything on at once! + +tools: + + # https://scrutinizer-ci.com/docs/tools/php/code-coverage/ + php_code_coverage: + enabled: false # This should never be enabled! + + # https://scrutinizer-ci.com/docs/tools/php/code-sniffer/ + php_code_sniffer: + enabled: true + filter: + paths: + - 'includes/*.php' + excluded_paths: + - 'includes/libs/*' + # Current config is based on the following version with a few tweaks + # https://github.com/wikimedia/mediawiki-tools-codesniffer/blob/0bebf0f7bf3cb6ed45bc424d3f7668fa5ace8a9e/MediaWiki/ruleset.xml + config: + tab_width: 0 + encoding: utf8 + ruleset: ~ + standard: custom + sniffs: + psr1: + classes: + class_declaration_sniff: false + files: + side_effects_sniff: false + generic: + code_analysis: + unused_function_parameter_sniff: false + for_loop_with_test_function_call_sniff: true + unconditional_if_statement_sniff: true + empty_statement_sniff: false + unnecessary_final_modifier_sniff: true + for_loop_should_be_while_loop_sniff: true + useless_overriding_method_sniff: false # This detects alot of incorrect issues + jumbled_incrementer_sniff: true + classes: + duplicate_class_name_sniff: true + white_space: + disallow_tab_indent_sniff: false + scope_indent_sniff: false + disallow_space_indent_sniff: true + php: + disallow_short_open_tag_sniff: false + sapi_usage_sniff: true + no_silenced_errors_sniff: true + deprecated_functions_sniff: false # This is true in the spec, we will ignore it + upper_case_constant_sniff: false + closing_php_tag_sniff: false + forbidden_functions_sniff: true + lower_case_constant_sniff: true + character_before_php_opening_tag_sniff: false + lower_case_keyword_sniff: true + formatting: + multiple_statement_alignment_sniff: false + no_space_after_cast_sniff: false + space_after_cast_sniff: false + disallow_multiple_statements_sniff: true + functions: + function_call_argument_spacing_sniff: true + opening_function_brace_kernighan_ritchie_sniff: true + opening_function_brace_bsd_allman_sniff: false + call_time_pass_by_reference_sniff: true + files: + one_interface_per_file_sniff: false + end_file_newline_sniff: true + line_length_sniff: false # This is true in the spec, we will ignore it + inline_html_sniff: false + byte_order_mark_sniff: true + end_file_no_newline_sniff: false + one_class_per_file_sniff: false + line_endings_sniff: true + version_control: + subversion_properties_sniff: false + commenting: + fixme_sniff: false + todo_sniff: false + control_structures: + inline_control_structure_sniff: false + strings: + unnecessary_string_concat_sniff: false + naming_conventions: + camel_caps_function_name_sniff: false + constructor_name_sniff: true + upper_case_constant_name_sniff: true + metrics: + cyclomatic_complexity_sniff: false + nesting_level_sniff: false + zend: + debug: + code_analyzer_sniff: false + files: + closing_tag_sniff: true + naming_conventions: + valid_variable_name_sniff: false + squiz: + scope: + static_this_usage_sniff: true + method_scope_sniff: false + member_var_scope_sniff: false + code_analysis: + empty_statement_sniff: false + classes: + lowercase_class_keywords_sniff: false + valid_class_name_sniff: false + class_file_name_sniff: false + self_member_reference_sniff: false + class_declaration_sniff: false + arrays: + array_bracket_spacing_sniff: false + array_declaration_sniff: false + objects: + object_instantiation_sniff: false + white_space: + logical_operator_spacing_sniff: true + language_construct_spacing_sniff: true + operator_spacing_sniff: false + control_structure_spacing_sniff: false + function_opening_brace_space_sniff: false + function_spacing_sniff: false + superfluous_whitespace_sniff: true + member_var_spacing_sniff: false + scope_closing_brace_sniff: false # This is true in the spec, we will ignore it as it makes alot of issues + scope_keyword_spacing_sniff: true + function_closing_brace_space_sniff: false + semicolon_spacing_sniff: true + cast_spacing_sniff: true + object_operator_spacing_sniff: false + php: + disallow_comparison_assignment_sniff: false + disallow_size_functions_in_loops_sniff: false + heredoc_sniff: false + disallow_ob_end_flush_sniff: false + inner_functions_sniff: false + forbidden_functions_sniff: false + eval_sniff: false + lowercase_p_h_p_functions_sniff: false + discouraged_functions_sniff: false + embedded_php_sniff: false + commented_out_code_sniff: false + disallow_inline_if_sniff: false + disallow_multiple_assignments_sniff: false + global_keyword_sniff: false + non_executable_code_sniff: false + formatting: + operator_bracket_sniff: false + functions: + lowercase_function_keywords_sniff: false + global_function_sniff: false + function_duplicate_argument_sniff: false + multi_line_function_declaration_sniff: false + function_declaration_argument_spacing_sniff: false + function_declaration_sniff: false + files: + file_extension_sniff: false + commenting: + inline_comment_sniff: false + post_statement_comment_sniff: false + class_comment_sniff: false + doc_comment_alignment_sniff: false + block_comment_sniff: false + function_comment_sniff: false + function_comment_throw_tag_sniff: false + variable_comment_sniff: false + empty_catch_comment_sniff: false + file_comment_sniff: false + long_condition_closing_comment_sniff: false + closing_declaration_comment_sniff: false + control_structures: + control_signature_sniff: false + lowercase_declaration_sniff: false + inline_if_declaration_sniff: false + for_each_loop_declaration_sniff: false + for_loop_declaration_sniff: false + switch_declaration_sniff: false + else_if_declaration_sniff: false + strings: + echoed_strings_sniff: false + concatenation_spacing_sniff: false + double_quote_usage_sniff: false + naming_conventions: + valid_function_name_sniff: false + valid_variable_name_sniff: false + constant_case_sniff: false + operators: + increment_decrement_usage_sniff: false + valid_logical_operators_sniff: false + comparison_operator_usage_sniff: false + my_source: + php: + return_function_value_sniff: false + eval_object_factory_sniff: false + debug: + debug_code_sniff: false + commenting: + function_comment_sniff: false + psr2: + classes: + property_declaration_sniff: true + class_declaration_sniff: false + methods: + method_declaration_sniff: true + namespaces: + namespace_declaration_sniff: false # This is true in the spec, we will ignore it + use_declaration_sniff: false # This is true in the spec, we will ignore it + files: + end_file_newline_sniff: false + control_structures: + control_structure_spacing_sniff: false + switch_declaration_sniff: false + else_if_declaration_sniff: true + pear: + classes: + class_declaration_sniff: false + white_space: + object_operator_indent_sniff: false + scope_indent_sniff: false + scope_closing_brace_sniff: false + formatting: + multi_line_assignment_sniff: false + functions: + function_call_signature_sniff: false + function_declaration_sniff: false + valid_default_value_sniff: false + files: + including_file_sniff: false + commenting: + inline_comment_sniff: false + class_comment_sniff: false + function_comment_sniff: false + file_comment_sniff: false + control_structures: + control_signature_sniff: false + multi_line_condition_sniff: false + naming_conventions: + valid_function_name_sniff: false + valid_variable_name_sniff: false + valid_class_name_sniff: true + wordpress: + arrays: + array_declaration_sniff: false + classes: + valid_class_name_sniff: false + files: + file_name_sniff: false + formatting: + multiple_statement_alignment_sniff: false # This is true in the spec, we will ignore it + functions: + function_call_signature_sniff: false + function_declaration_argument_spacing_sniff: false + naming_conventions: + valid_function_name_sniff: false + objects: + object_instantiation_sniff: false + php: + discouraged_functions_sniff: false + strings: + double_quote_usage_sniff: false + white_space: + control_structure_spacing_sniff: false + operator_spacing_sniff: false + php_indent_sniff: false + xss: + escape_output_sniff: false + + # https://scrutinizer-ci.com/docs/tools/php/php-analyzer/ + php_analyzer: + enabled: false # PHP Fatal error: Out of memory. See https://github.com/scrutinizer-ci/php-analyzer/pull/133 + + # https://scrutinizer-ci.com/docs/tools/javascript/jshint/ + js_hint: + enabled: false # Generates around 4500 issues + + # https://scrutinizer-ci.com/docs/tools/php/copy-paste-detector/ + php_cpd: + enabled: false + + # https://scrutinizer-ci.com/docs/tools/php/mess-detector/ + php_mess_detector: + enabled: false + + # https://scrutinizer-ci.com/docs/tools/php/hhvm/ + php_hhvm: + enabled: false + + # https://scrutinizer-ci.com/docs/tools/php/cs-fixer/ + php_cs_fixer: + enabled: false + + # https://scrutinizer-ci.com/docs/tools/php/pdepend/ + php_pdepend: + enabled: false + + # https://github.com/sebastianbergmann/phploc + php_loc: + enabled: false -- To view, visit https://gerrit.wikimedia.org/r/116521 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ec25145239331f8d1ef4bab2a0b97a1949ef698 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Addshore <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
