forked from elkarte/Elkarte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.scrutinizer.yml
116 lines (115 loc) · 8.03 KB
/
.scrutinizer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
filter:
excluded_paths:
- 'attachments/*'
- 'avatars/*'
- 'cache/*'
- 'docs/*'
- 'packages/*'
- 'smileys/*'
- 'tests/*'
- 'ext/*'
- 'sources/ext/*'
- 'install/*'
- 'languages/*'
- themes/default/scripts/jquery-1.11.1.min.js
- themes/default/scripts/jquery.atwho.js
- themes/default/scripts/jquery.caret.min.js
- themes/default/scripts/jquery.sceditor.bbcode.min.js
- themes/default/scripts/jquery.sceditor.min.js
- themes/default/scripts/jquery-ui-1.10.4.min.js
- themes/default/scripts/prettify.min.js
- themes/default/scripts/sha256.js
checks:
php:
code_rating: true
duplication: true
tools:
external_code_coverage:
timeout: 1800
js_hint:
filter:
excluded_paths: ['attachments/*', 'avatars/*', 'cache/*', 'docs/*', 'packages/*', 'smileys/*', 'tests/*', 'sources/ext/*', 'ext/*', themes/default/scripts/jquery-1.11.1.min.js, themes/default/scripts/jquery.atwho.js, themes/default/scripts/jquery.caret.min.js, themes/default/scripts/jquery.sceditor.bbcode.min.js, themes/default/scripts/jquery.sceditor.min.js, themes/default/scripts/jquery-ui-1.10.4.min.js, themes/default/scripts/prettify.min.js, themes/default/scripts/sha256.js]
php_mess_detector:
config:
unused_code_rules: { unused_local_variable: true, unused_private_method: true }
controversial_rules: { superglobals: false }
php_analyzer:
filter:
excluded_paths: ['attachments/*', 'avatars/*', 'cache/*', 'docs/*', 'packages/*', 'smileys/*', 'tests/*', 'sources/ext/*', 'ext/*', 'install/*', 'languages/*']
config:
parameter_reference_check: { enabled: true }
checkstyle: { enabled: false, no_trailing_whitespace: true, naming: { enabled: true, local_variable: '^[a-z][a-zA-Z0-9]*$', abstract_class_name: ^Abstract|Factory$, utility_class_name: 'Utils?$', constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$', property_name: '^[a-z][a-zA-Z0-9]*$', method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$', parameter_name: '^[a-z][a-zA-Z0-9]*$', interface_name: '^[A-Z][a-zA-Z0-9]*Interface$', type_name: '^[A-Z][a-zA-Z0-9]*$', exception_name: '^[A-Z][a-zA-Z0-9]*Exception$', isser_method_name: '^(?:is|has|should|may|supports)' } }
unreachable_code: { enabled: false }
check_access_control: { enabled: true }
typo_checks: { enabled: true }
check_variables: { enabled: true }
check_calls: { enabled: true, too_many_arguments: true, missing_argument: true, argument_type_checks: lenient }
suspicious_code: { enabled: true, parameter_multiple_times: true, non_commented_switch_fallthrough: true, non_commented_empty_catch_block: true, precedence_in_condition_assignment: true, overriding_parameter: false, overriding_closure_use: false, parameter_closure_use_conflict: false, non_existent_class_in_instanceof_check: false, non_existent_class_in_catch_clause: false, assignment_of_null_return: false, overriding_private_members: false, use_statement_alias_conflict: false }
dead_assignments: { enabled: true }
verify_php_doc_comments: { enabled: true, parameters: true, suggest_more_specific_types: true, ask_for_param_type_annotation: true, return: false, ask_for_return_if_not_inferrable: false }
loops_must_use_braces: { enabled: false }
check_usage_context: { enabled: true, method_call_on_non_object: null, foreach: { value_as_reference: true, traversable: false }, missing_argument: null, argument_type_checks: null }
simplify_boolean_return: { enabled: true }
phpunit_checks: { enabled: false }
reflection_checks: { enabled: false }
precedence_checks: { enabled: true, assignment_in_condition: true, comparison_of_bit_result: true }
basic_semantic_checks: { enabled: true }
unused_code: { enabled: true }
deprecation_checks: { enabled: true }
useless_function_calls: { enabled: true }
metrics_lack_of_cohesion_methods: { enabled: true }
metrics_coupling: { enabled: true, stable_code: { namespace_prefixes: { }, classes: { } } }
doctrine_parameter_binding: { enabled: false }
doctrine_entity_manager_injection: { enabled: false }
symfony_request_injection: { enabled: false }
doc_comment_fixes: { enabled: false }
reflection_fixes: { enabled: false }
use_statement_fixes: { enabled: false, remove_unused: false, preserve_multiple: false, preserve_blanklines: false, order_alphabetically: false }
php_code_sniffer:
filter:
excluded_paths: ['attachments/*', 'avatars/*', 'cache/*', 'docs/*', 'packages/*', 'smileys/*', 'tests/*', 'ext/*', 'sources/ext/*', 'install/*', 'languages/*', themes/default/scripts/jquery-1.11.1.min.js, themes/default/scripts/jquery.atwho.js, themes/default/scripts/jquery.caret.min.js, themes/default/scripts/jquery.sceditor.bbcode.min.js, themes/default/scripts/jquery.sceditor.min.js, themes/default/scripts/jquery-ui-1.10.4.min.js, themes/default/scripts/prettify.min.js, themes/default/scripts/sha256.js]
config:
sniffs: { psr1: { files: { side_effects_sniff: false } }, generic: { code_analysis: { for_loop_with_test_function_call_sniff: false, jumbled_incrementer_sniff: false }, php: { forbidden_functions_sniff: true, lower_case_constant_sniff: true, character_before_php_opening_tag_sniff: false }, formatting: { space_after_cast_sniff: true }, functions: { function_call_argument_spacing_sniff: true, opening_function_brace_bsd_allman_sniff: true }, files: { end_file_no_newline_sniff: true }, strings: { unnecessary_string_concat_sniff: true }, naming_conventions: { constructor_name_sniff: true, upper_case_constant_name_sniff: true } }, zend: { files: { closing_tag_sniff: true } }, squiz: { classes: { lowercase_class_keywords_sniff: true, class_declaration_sniff: true, self_member_reference_sniff: false }, objects: { object_instantiation_sniff: true }, white_space: { logical_operator_spacing_sniff: true, operator_spacing_sniff: true, semicolon_spacing_sniff: true, cast_spacing_sniff: true }, php: { disallow_ob_end_flush_sniff: true, lowercase_p_h_p_functions_sniff: true, commented_out_code_sniff: false, non_executable_code_sniff: false }, functions: { lowercase_function_keywords_sniff: true, function_duplicate_argument_sniff: true }, commenting: { function_comment_throw_tag_sniff: true }, strings: { double_quote_usage_sniff: true }, operators: { valid_logical_operators_sniff: true } } }
sensiolabs_security_checker:
filter:
excluded_paths: ['attachments/*', 'avatars/*', 'cache/*', 'docs/*', 'packages/*', 'smileys/*', 'tests/*']
php_loc:
names:
- 'sources/*.php'
- 'themes/*.php'
- '*.php'
excluded_dirs:
- attachments
- avatars
- cache
- docs
- packages
- smileys
- tests
- ext
- sources/ext
- install
- languages
php_cpd:
excluded_dirs:
- attachments
- avatars
- cache
- docs
- packages
- smileys
- tests
- ext
- sources/ext
- install
- languages
php_mess_detector:
config:
code_size_rules: { cyclomatic_complexity: true, npath_complexity: true, excessive_parameter_list: true, too_many_methods: true, excessive_class_complexity: true }
unused_code_rules: { unused_local_variable: true, unused_private_method: true, unused_formal_parameter: true }
naming_rules: { boolean_method_name: true }
controversial_rules: { superglobals: false }
php_sim:
min_mass: 30
filter:
excluded_paths: ['attachments/*', 'avatars/*', 'cache/*', 'docs/*', 'packages/*', 'smileys/*', 'tests/*', 'ext/*', 'sources/ext/*', 'install/*']