Skip to content

Commit aa771ec

Browse files
committed
[PLUTO-1412] test init
1 parent 8062f87 commit aa771ec

File tree

5 files changed

+98
-0
lines changed

5 files changed

+98
-0
lines changed

.codacy/cli-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mode: local
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mode: local
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
runtimes:
2+
3+
4+
5+
tools:
6+
7+
8+
9+
10+
11+
12+
13+
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: 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 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: 5
14+
title: Medium Cyclomatic Complexity control
15+
Lizard_file-nloc-medium:
16+
category: Complexity
17+
description: Check the number of lines of code (without comments) in a file. If the threshold is not met, raise a Medium issue. The default threshold is 500.
18+
explanation: ""
19+
id: Lizard_file-nloc-medium
20+
level: Warning
21+
severityLevel: Warning
22+
threshold: 500
23+
timeToFix: 5
24+
title: Medium File NLOC control - Number of Lines of Code (without comments)
25+
Lizard_nloc-medium:
26+
category: Complexity
27+
description: 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.
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: 5
37+
title: Medium NLOC control - Number of Lines of Code (without comments)
38+
Lizard_parameter-count-medium:
39+
category: Complexity
40+
description: Check the number of parameters sent to a function. If the threshold is not met, raise a Medium issue. The default threshold is 8.
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: 5
50+
title: Medium Parameter count control
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
set -e
3+
4+
5+
TOOL_DIR="integration-tests/init-without-token"
6+
CLI_PATH="$(pwd)/cli-v2"
7+
8+
# Change to the tool's test directory
9+
cd "$TOOL_DIR" || exit 1
10+
11+
12+
rm -rf .codacy
13+
# Run analysis
14+
"$CLI_PATH" init
15+
16+
17+
compare_file() {
18+
local expected="$1"
19+
local actual="$2"
20+
local label="$3"
21+
22+
if diff "$expected" "$actual"; then
23+
echo "$label matches expected"
24+
else
25+
echo "$label does not match expected"
26+
exit 1
27+
fi
28+
}
29+
30+
31+
compare_file expected-files/cli-config.yaml .codacy/cli-config.yaml "cli-config.yaml"
32+
compare_file expected-files/codacy.yaml .codacy/codacy.yaml "codacy.yaml"
33+

0 commit comments

Comments
 (0)