Skip to content

Commit ffbc80c

Browse files
committed
Too many parameters integration test
1 parent 6acf02c commit ffbc80c

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System;
2+
3+
public class Parameters
4+
{
5+
public static void F0()
6+
{
7+
}
8+
9+
public static void F1(object dog, object cat)
10+
{
11+
}
12+
13+
public static void F2(object a, object b, object c, object d, object e, object f)
14+
{
15+
}
16+
17+
public static void F3()
18+
{
19+
object foo = Bar(1, 2, 3, 4);
20+
}
21+
22+
public static object Bar(int a, int b, int c, int d)
23+
{
24+
return new object();
25+
}
26+
}

qlty-cli/tests/lang/csharp/basic.stdout

+48-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"metadata": {
33
"buildId": "[..]",
44
"result": "ANALYSIS_RESULT_SUCCESS",
5-
"filesAnalyzed": 6,
5+
"filesAnalyzed": 7,
66
"startTime": "[..]",
77
"finishTime": "[..]",
88
"commitMessage": "initial/n",
@@ -187,6 +187,33 @@
187187
},
188188
"mode": "MODE_BLOCK"
189189
},
190+
{
191+
"buildId": "[..]",
192+
"analyzedAt": "[..]",
193+
"tool": "qlty",
194+
"driver": "structure",
195+
"ruleKey": "function-parameters",
196+
"message": "Function with many parameters (count = 6): F2",
197+
"level": "LEVEL_MEDIUM",
198+
"language": "LANGUAGE_C_SHARP",
199+
"category": "CATEGORY_STRUCTURE",
200+
"snippet": "(object a, object b, object c, object d, object e, object f)",
201+
"snippetWithContext": "public class Parameters/n{/n public static void F0()/n {/n }/n/n public static void F1(object dog, object cat)/n {/n }/n/n public static void F2(object a, object b, object c, object d, object e, object f)/n {/n }/n/n public static void F3()/n {/n object foo = Bar(1, 2, 3, 4);/n }/n/n public static object Bar(int a, int b, int c, int d)/n {",
202+
"effortMinutes": 15,
203+
"value": 6,
204+
"location": {
205+
"path": "Parameters.cs",
206+
"range": {
207+
"startLine": 13,
208+
"startColumn": 26,
209+
"endLine": 13,
210+
"endColumn": 86,
211+
"startByte": 170,
212+
"endByte": 230
213+
}
214+
},
215+
"mode": "MODE_BLOCK"
216+
},
190217
{
191218
"buildId": "[..]",
192219
"analyzedAt": "[..]",
@@ -390,6 +417,26 @@
390417
"complexity": 15,
391418
"cyclomatic": 24,
392419
"lcom4": 0
420+
},
421+
{
422+
"buildId": "[..]",
423+
"analyzedAt": "[..]",
424+
"name": "Parameters.cs",
425+
"fullyQualifiedName": "Parameters.cs",
426+
"path": "Parameters.cs",
427+
"kind": "COMPONENT_TYPE_FILE",
428+
"language": "LANGUAGE_C_SHARP",
429+
"files": 1,
430+
"classes": 1,
431+
"functions": 5,
432+
"fields": 0,
433+
"lines": 26,
434+
"codeLines": 17,
435+
"commentLines": 0,
436+
"blankLines": 9,
437+
"complexity": 0,
438+
"cyclomatic": 1,
439+
"lcom4": 0
393440
}
394441
]
395442
}

0 commit comments

Comments
 (0)