Skip to content

Commit 0b0e931

Browse files
committed
Update logic and rearrange files
1 parent 3e8f0fd commit 0b0e931

21 files changed

+1797
-820
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ It's also sensitive to code quality best practices—things like avoiding global
1515

1616
The overall score for a project should ideally be below **3** to ensure the code is maintainable and easy to understand. However, some files that involve more advanced or domain-specific logic may range between **3 and 4**. The default threshold for the a-score across the whole project is **3.3**, meaning the codebase should strive to keep its complexity below this level, but you can adjust this based on your team's needs.
1717

18-
### B-Score
18+
### B-Score [BETA]
1919

2020
The b-score evaluates your code’s according to the Single Level of Abstraction (SLA) principle promoted by Uncle Bob’s *Clean Code*. The tool analyzes the abstraction levels in your code and assigns a score based on whether functions are mixing high- and low-level operations.
2121

@@ -38,12 +38,15 @@ The CLI follows a specific convention for enabling and disabling boolean flags:
3838
This applies to all boolean flags in the tool.
3939

4040
```bash
41-
-a, --a-score # Enable A score (default: True), disable with --no-a-score
42-
-b, --b-score # Enable B score (default: True), disable with --no-b-score
43-
-r, --recommendation # Enable recommendations (default: True), disable with --no-recommendation
44-
-at, --a-score-threshold # Set A score threshold (default: 3.3)
45-
-bt, --b-score-threshold # Set B score threshold (default: 2.5)
46-
-c, --clear # Clear existing reports and re-evaluate all files (default: False)
41+
-a, --a-score # Enable A score (default: True), disable with --no-a-score
42+
-b, --b-score # Enable B score (default: False), disable with --no-b-score
43+
-ps, --print-improvement-suggestions # Enable print of improvement suggestions (default: false), disable with --no-print-improvement-suggestions
44+
-at, --a-score-threshold # Set A score threshold (default: 3.3)
45+
-bt, --b-score-threshold # Set B score threshold (default: 2.5)
46+
-c, --clear # Clear existing reports and re-evaluate all files (default: False)
47+
-d, --details # Add details for every function into report file (default: False)
48+
-e, --error-info # Add debug error message to report file (default: False)
49+
-i, --improvement-suggestions # Add improvement suggestion to report file (default: False)
4750
```
4851

4952
### Configuration File
@@ -117,11 +120,11 @@ Analyzing files: 14
117120
Changed files: 3
118121
Progress 100%
119122
Done: 13.9s
120-
Recommendations:
123+
Improvement Suggestions:
121124
122125
File: astrogpt/handler/llm_reasoning/collect_data.py
123126
124-
Recommendation: Refactor the collect_data function by breaking it down into smaller functions that handle specific tasks, such as handling user input, updating user information, and managing actions taken. This will reduce its cognitive complexity and improve readability.
127+
Suggestion: Refactor the collect_data function by breaking it down into smaller functions that handle specific tasks, such as handling user input, updating user information, and managing actions taken. This will reduce its cognitive complexity and improve readability.
125128
126129
a-score is too high
127130
```
@@ -131,7 +134,7 @@ a-score is too high
131134
```json
132135
{
133136
"file_count": 1,
134-
"version": "0.1.1",
137+
"version": "0.2.0",
135138
"a_score": 2.98,
136139
"recommendation_count": 0,
137140
"b_score": 1.0,
@@ -141,10 +144,7 @@ a-score is too high
141144
"hash": "e62be0853d65c71a2600c8a614566ba4",
142145
"line_count": 86,
143146
"a_score": 2.98,
144-
"a_score_error_message": "",
145-
"improvement_suggestions": "",
146147
"b_score": 1.0,
147-
"b_score_error_message": ""
148148
}
149149
]
150150
}

0 commit comments

Comments
 (0)