File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 40
40
for FILE in $CHANGED_FILES; do
41
41
echo "Processing file: $FILE"
42
42
43
- # Get method names and their line numbers
44
- METHODS=$(radon cc $FILE -s | grep -oP "^\s*\d+.*\K[^\(]+" || true)
43
+ # Run radon cc and check the raw output
44
+ RADON_OUTPUT=$(radon cc $FILE -s || true)
45
+ echo "Raw Radon Output for $FILE:"
46
+ echo "$RADON_OUTPUT"
47
+
48
+ # Check if there are methods in the output
49
+ METHODS=$(echo "$RADON_OUTPUT" | grep -oP "^\s*\d+.*\K[^\(]+" || true)
45
50
echo "Methods found: $METHODS"
46
51
47
52
# Extract the lines that are changed in this file
50
55
LINE_NUMBER=$(echo $LINE | grep -oP '(?<=\+)\d+')
51
56
52
57
# Match the method based on line number
53
- MATCHING_METHOD=$(radon cc $FILE -s | awk -v line=$LINE_NUMBER '{
58
+ MATCHING_METHOD=$(echo "$RADON_OUTPUT" | awk -v line=$LINE_NUMBER '{
54
59
if ($1 ~ /^[0-9]+:/ && $1 <= line) method=$NF;
55
60
if ($1 > line) { print method; exit }
56
61
}')
You can’t perform that action at this time.
0 commit comments