Skip to content

Commit 11a90d0

Browse files
it test - commit expected files
1 parent 5b99a5f commit 11a90d0

File tree

10 files changed

+34888
-1
lines changed

10 files changed

+34888
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mode: local

integration-tests/config-discover/expected/codacy.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
mode: local
21
runtimes:
32
43
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
analyzer:
2+
errors:
3+
always_use_package_imports: error
4+
avoid_dynamic_calls: error
5+
avoid_empty_else: error
6+
avoid_print: error
7+
avoid_relative_lib_imports: error
8+
avoid_returning_null_for_future: error
9+
avoid_slow_async_io: error
10+
avoid_type_to_string: error
11+
avoid_types_as_parameter_names: error
12+
avoid_web_libraries_in_flutter: error
13+
cancel_subscriptions: error
14+
close_sinks: error
15+
collection_methods_unrelated_type: error
16+
comment_references: error
17+
control_flow_in_finally: error
18+
depend_on_referenced_packages: info
19+
diagnostic_describe_all_properties: error
20+
discarded_futures: error
21+
empty_statements: error
22+
hash_and_equals: error
23+
invariant_booleans: error
24+
iterable_contains_unrelated_type: error
25+
list_remove_unrelated_type: error
26+
literal_only_boolean_expressions: error
27+
no_adjacent_strings_in_list: error
28+
no_duplicate_case_values: error
29+
no_logic_in_create_state: error
30+
package_names: info
31+
prefer_relative_imports: error
32+
prefer_void_to_null: error
33+
secure_pubspec_urls: info
34+
sort_pub_dependencies: info
35+
test_types_in_equals: error
36+
throw_in_finally: error
37+
unnecessary_statements: error
38+
unrelated_type_equality_checks: error
39+
unsafe_html: error
40+
use_build_context_synchronously: error
41+
use_key_in_widget_constructors: error
42+
valid_regexps: error
43+
linter:
44+
rules:
45+
always_declare_return_types: "true"
46+
always_put_control_body_on_new_line: "true"
47+
always_put_required_named_parameters_first: "true"
48+
always_require_non_null_named_parameters: "true"
49+
always_specify_types: "true"
50+
annotate_overrides: "true"
51+
avoid_annotating_with_dynamic: "true"
52+
avoid_as: "true"
53+
avoid_bool_literals_in_conditional_expressions: "true"
54+
avoid_catches_without_on_clauses: "true"
55+
avoid_catching_errors: "true"
56+
avoid_classes_with_only_static_members: "true"
57+
avoid_double_and_int_checks: "true"
58+
avoid_equals_and_hash_code_on_mutable_classes: "true"
59+
avoid_escaping_inner_quotes: "true"
60+
avoid_field_initializers_in_const_classes: "true"
61+
avoid_final_parameters: "true"
62+
avoid_function_literals_in_foreach_calls: "true"
63+
avoid_implementing_value_types: "true"
64+
avoid_init_to_null: "true"
65+
avoid_js_rounded_ints: "true"
66+
avoid_multiple_declarations_per_line: "true"
67+
avoid_null_checks_in_equality_operators: "true"
68+
avoid_positional_boolean_parameters: "true"
69+
avoid_private_typedef_functions: "true"
70+
avoid_redundant_argument_values: "true"
71+
avoid_renaming_method_parameters: "true"
72+
avoid_return_types_on_setters: "true"
73+
avoid_returning_null: "true"
74+
avoid_returning_null_for_void: "true"
75+
avoid_returning_this: "true"
76+
avoid_setters_without_getters: "true"
77+
avoid_shadowing_type_parameters: "true"
78+
avoid_single_cascade_in_expression_statements: "true"
79+
avoid_types_on_closure_parameters: "true"
80+
avoid_unnecessary_containers: "true"
81+
avoid_unused_constructor_parameters: "true"
82+
avoid_void_async: "true"
83+
await_only_futures: "true"
84+
camel_case_extensions: "true"
85+
camel_case_types: "true"
86+
cascade_invocations: "true"
87+
cast_nullable_to_non_nullable: "true"
88+
combinators_ordering: "true"
89+
conditional_uri_does_not_exist: "true"
90+
constant_identifier_names: "true"
91+
curly_braces_in_flow_control_structures: "true"
92+
dangling_library_doc_comments: "true"
93+
deprecated_consistency: "true"
94+
directives_ordering: "true"
95+
do_not_use_environment: "true"
96+
empty_catches: "true"
97+
empty_constructor_bodies: "true"
98+
enable_null_safety: "true"
99+
eol_at_end_of_file: "true"
100+
exhaustive_cases: "true"
101+
file_names: "true"
102+
flutter_style_todos: "true"
103+
implementation_imports: "true"
104+
implicit_call_tearoffs: "true"
105+
join_return_with_assignment: "true"
106+
leading_newlines_in_multiline_strings: "true"
107+
library_annotations: "true"
108+
library_names: "true"
109+
library_prefixes: "true"
110+
library_private_types_in_public_api: "true"
111+
lines_longer_than_80_chars: "true"
112+
missing_whitespace_between_adjacent_strings: "true"
113+
no_default_cases: "true"
114+
no_leading_underscores_for_library_prefixes: "true"
115+
no_leading_underscores_for_local_identifiers: "true"
116+
no_runtimeType_toString: "true"
117+
non_constant_identifier_names: "true"
118+
noop_primitive_operations: "true"
119+
null_check_on_nullable_type_parameter: "true"
120+
null_closures: "true"
121+
omit_local_variable_types: "true"
122+
one_member_abstracts: "true"
123+
only_throw_errors: "true"
124+
overridden_fields: "true"
125+
package_api_docs: "true"
126+
package_prefixed_library_names: "true"
127+
parameter_assignments: "true"
128+
prefer_adjacent_string_concatenation: "true"
129+
prefer_asserts_in_initializer_lists: "true"
130+
prefer_asserts_with_message: "true"
131+
prefer_bool_in_asserts: "true"
132+
prefer_collection_literals: "true"
133+
prefer_conditional_assignment: "true"
134+
prefer_const_constructors: "true"
135+
prefer_const_constructors_in_immutables: "true"
136+
prefer_const_declarations: "true"
137+
prefer_const_literals_to_create_immutables: "true"
138+
prefer_constructors_over_static_methods: "true"
139+
prefer_contains: "true"
140+
prefer_double_quotes: "true"
141+
prefer_equal_for_default_values: "true"
142+
prefer_expression_function_bodies: "true"
143+
prefer_final_fields: "true"
144+
prefer_final_in_for_each: "true"
145+
prefer_final_locals: "true"
146+
prefer_final_parameters: "true"
147+
prefer_for_elements_to_map_fromIterable: "true"
148+
prefer_foreach: "true"
149+
prefer_function_declarations_over_variables: "true"
150+
prefer_generic_function_type_aliases: "true"
151+
prefer_if_elements_to_conditional_expressions: "true"
152+
prefer_if_null_operators: "true"
153+
prefer_initializing_formals: "true"
154+
prefer_inlined_adds: "true"
155+
prefer_int_literals: "true"
156+
prefer_interpolation_to_compose_strings: "true"
157+
prefer_is_empty: "true"
158+
prefer_is_not_empty: "true"
159+
prefer_is_not_operator: "true"
160+
prefer_iterable_whereType: "true"
161+
prefer_mixin: "true"
162+
prefer_null_aware_method_calls: "true"
163+
prefer_null_aware_operators: "true"
164+
prefer_single_quotes: "true"
165+
prefer_spread_collections: "true"
166+
prefer_typing_uninitialized_variables: "true"
167+
provide_deprecation_message: "true"
168+
public_member_api_docs: "true"
169+
recursive_getters: "true"
170+
require_trailing_commas: "true"
171+
sized_box_for_whitespace: "true"
172+
sized_box_shrink_expand: "true"
173+
slash_for_doc_comments: "true"
174+
sort_child_properties_last: "true"
175+
sort_constructors_first: "true"
176+
sort_unnamed_constructors_first: "true"
177+
super_goes_last: "true"
178+
tighten_type_of_initializing_formals: "true"
179+
type_annotate_public_apis: "true"
180+
type_init_formals: "true"
181+
unawaited_futures: "true"
182+
unnecessary_await_in_return: "true"
183+
unnecessary_brace_in_string_interps: "true"
184+
unnecessary_const: "true"
185+
unnecessary_constructor_name: "true"
186+
unnecessary_final: "true"
187+
unnecessary_getters_setters: "true"
188+
unnecessary_lambdas: "true"
189+
unnecessary_late: "true"
190+
unnecessary_library_directive: "true"
191+
unnecessary_new: "true"
192+
unnecessary_null_aware_assignments: "true"
193+
unnecessary_null_aware_operator_on_extension_on_nullable: "true"
194+
unnecessary_null_checks: "true"
195+
unnecessary_null_in_if_null_operators: "true"
196+
unnecessary_nullable_for_final_variable_declarations: "true"
197+
unnecessary_overrides: "true"
198+
unnecessary_parenthesis: "true"
199+
unnecessary_raw_strings: "true"
200+
unnecessary_string_escapes: "true"
201+
unnecessary_string_interpolations: "true"
202+
unnecessary_this: "true"
203+
unnecessary_to_list_in_spreads: "true"
204+
unreachable_from_main: "true"
205+
use_colored_box: "true"
206+
use_decorated_box: "true"
207+
use_enums: "true"
208+
use_full_hex_values_for_flutter_colors: "true"
209+
use_function_type_syntax_for_parameters: "true"
210+
use_if_null_to_convert_nulls_to_bools: "true"
211+
use_is_even_rather_than_modulo: "true"
212+
use_late_for_private_fields_and_variables: "true"
213+
use_named_constants: "true"
214+
use_raw_strings: "true"
215+
use_rethrow_when_possible: "true"
216+
use_setters_to_change_properties: "true"
217+
use_string_buffers: "true"
218+
use_string_in_part_of_directives: "true"
219+
use_super_parameters: "true"
220+
use_test_throws_matchers: "true"
221+
use_to_and_as_if_applicable: "true"
222+
void_checks: "true"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
export default [
2+
{
3+
rules: {
4+
"constructor-super": ["error"],
5+
"for-direction": ["error"],
6+
"getter-return": ["error"],
7+
"no-async-promise-executor": ["error"],
8+
"no-case-declarations": ["error"],
9+
"no-class-assign": ["error"],
10+
"no-compare-neg-zero": ["error"],
11+
"no-cond-assign": ["error", "except-parens"],
12+
"no-const-assign": ["error"],
13+
"no-constant-binary-expression": ["error"],
14+
"no-constant-condition": ["error"],
15+
"no-control-regex": ["error"],
16+
"no-debugger": ["error"],
17+
"no-delete-var": ["error"],
18+
"no-dupe-args": ["error"],
19+
"no-dupe-class-members": ["error"],
20+
"no-dupe-else-if": ["error"],
21+
"no-dupe-keys": ["error"],
22+
"no-duplicate-case": ["error"],
23+
"no-empty": ["error"],
24+
"no-empty-character-class": ["error"],
25+
"no-empty-pattern": ["error"],
26+
"no-empty-static-block": ["error"],
27+
"no-ex-assign": ["error"],
28+
"no-extra-boolean-cast": ["error"],
29+
"no-fallthrough": ["error"],
30+
"no-func-assign": ["error"],
31+
"no-global-assign": ["error"],
32+
"no-import-assign": ["error"],
33+
"no-invalid-regexp": ["error"],
34+
"no-irregular-whitespace": ["error"],
35+
"no-loss-of-precision": ["error"],
36+
"no-misleading-character-class": ["error", {"allowEscape": false}],
37+
"no-new-native-nonconstructor": ["error"],
38+
"no-nonoctal-decimal-escape": ["error"],
39+
"no-obj-calls": ["error"],
40+
"no-octal": ["error"],
41+
"no-prototype-builtins": ["error"],
42+
"no-redeclare": ["error"],
43+
"no-regex-spaces": ["error"],
44+
"no-self-assign": ["error"],
45+
"no-setter-return": ["error"],
46+
"no-shadow-restricted-names": ["error"],
47+
"no-sparse-arrays": ["error"],
48+
"no-this-before-super": ["error"],
49+
"no-undef": ["error"],
50+
"no-unexpected-multiline": ["error"],
51+
"no-unreachable": ["error"],
52+
"no-unsafe-finally": ["error"],
53+
"no-unsafe-negation": ["error"],
54+
"no-unsafe-optional-chaining": ["error"],
55+
"no-unused-labels": ["error"],
56+
"no-unused-private-class-members": ["error"],
57+
"no-unused-vars": ["error"],
58+
"no-useless-backreference": ["error"],
59+
"no-useless-catch": ["error"],
60+
"no-useless-escape": ["error"],
61+
"no-with": ["error"],
62+
"require-yield": ["error"],
63+
"use-isnan": ["error"],
64+
"valid-typeof": ["error"],
65+
}
66+
}
67+
];
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
tools:
2+
- name: dartanalyzer
3+
languages: [Dart]
4+
extensions: [.dart]
5+
- name: eslint
6+
languages: [JavaScript, TypeScript, JSX, TSX]
7+
extensions: [.js, .jsx, .ts, .tsx]
8+
- name: lizard
9+
languages: [C, CPP, Java, C#, JavaScript, TypeScript, VueJS, Objective-C, Swift, Python, Ruby, TTCN-3, PHP, Scala, GDScript, Golang, Lua, Rust, Fortran, Kotlin, Solidity, Erlang, Zig, Perl]
10+
extensions: [.c, .cpp, .cc, .h, .hpp, .java, .cs, .js, .jsx, .ts, .tsx, .vue, .m, .swift, .py, .rb, .ttcn, .php, .scala, .gd, .go, .lua, .rs, .f, .f90, .kt, .sol, .erl, .zig, .pl]
11+
- name: pmd
12+
languages: [Java, JavaScript, JSP, Velocity, XML, Apex, Scala, Ruby, VisualForce]
13+
extensions: [.java, .js, .jsp, .vm, .xml, .cls, .trigger, .scala, .rb, .page, .component]
14+
- name: pylint
15+
languages: [Python]
16+
extensions: [.py]
17+
- name: semgrep
18+
languages: [C, CPP, C#, Generic, Go, Java, JavaScript, JSON, Kotlin, Python, TypeScript, Ruby, Rust, JSX, PHP, Scala, Swift, Terraform]
19+
extensions: [.c, .cpp, .h, .hpp, .cs, .go, .java, .js, .json, .kt, .py, .ts, .rb, .rs, .jsx, .php, .scala, .swift, .tf, .tfvars]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
patterns:
2+
Lizard_ccn-medium:
3+
category: Complexity
4+
description: Checks if the cyclomatic complexity of a function or logic block exceeds the medium threshold (default is 8).
5+
explanation: |-
6+
# Medium Cyclomatic Complexity control
7+
8+
Check the Cyclomatic Complexity value of a function or logic block. If the threshold is not met, raise a Medium issue. The default threshold is 7.
9+
id: Lizard_ccn-medium
10+
level: Warning
11+
severityLevel: Warning
12+
threshold: 8
13+
timeToFix: 10
14+
title: Enforce Medium Cyclomatic Complexity Threshold
15+
Lizard_file-nloc-medium:
16+
category: Complexity
17+
description: This rule checks if the number of lines of code (excluding comments) in a file exceeds a medium threshold, typically 500 lines.
18+
explanation: ""
19+
id: Lizard_file-nloc-medium
20+
level: Warning
21+
severityLevel: Warning
22+
threshold: 500
23+
timeToFix: 10
24+
title: Enforce Medium File Length Limit Based on Number of Lines of Code
25+
Lizard_nloc-medium:
26+
category: Complexity
27+
description: Checks if the number of lines of code (excluding comments) in a function exceeds a medium threshold (default 50 lines).
28+
explanation: |-
29+
# Medium NLOC control - Number of Lines of Code (without comments)
30+
31+
Check the number of lines of code (without comments) in a function. If the threshold is not met, raise a Medium issue. The default threshold is 50.
32+
id: Lizard_nloc-medium
33+
level: Warning
34+
severityLevel: Warning
35+
threshold: 50
36+
timeToFix: 10
37+
title: Enforce Medium Number of Lines of Code (NLOC) Limit
38+
Lizard_parameter-count-medium:
39+
category: Complexity
40+
description: This rule checks the number of parameters passed to a function and raises an issue if it exceeds a medium threshold, which by default is 8 parameters.
41+
explanation: |-
42+
# Medium Parameter count control
43+
44+
Check the number of parameters sent to a function. If the threshold is not met, raise a Medium issue. The default threshold is 5.
45+
id: Lizard_parameter-count-medium
46+
level: Warning
47+
severityLevel: Warning
48+
threshold: 8
49+
timeToFix: 10
50+
title: Enforce Medium Parameter Count Limit
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[MASTER]
2+
ignore=CVS
3+
persistent=yes
4+
load-plugins=
5+
6+
[MESSAGES CONTROL]
7+
disable=all
8+
enable=C0123,C0200,C0303,E0100,E0101,E0102,E0103,E0104,E0105,E0106,E0107,E0108,E0110,E0112,E0113,E0114,E0115,E0116,E0117,E0202,E0203,E0211,E0236,E0238,E0239,E0240,E0241,E0301,E0302,E0601,E0603,E0604,E0701,E0702,E0704,E0710,E0711,E0712,E1003,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1132,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,R0202,R0203,W0101,W0102,W0104,W0105,W0106,W0107,W0108,W0109,W0120,W0122,W0124,W0150,W0199,W0221,W0222,W0233,W0404,W0410,W0601,W0602,W0604,W0611,W0612,W0622,W0702,W0705,W0711,W1300,W1301,W1302,W1303,W1305,W1306,W1307
9+

0 commit comments

Comments
 (0)