1
Upload
2
Analysis & Review
3
Export
12
Critical Violations
5
Style Warnings
98%
Auto-Fix Confidence
0.4s
Processing Time
Code Conformance Review
Structural Mismatch
Naming Convention
Original Source (input.py)
Non-Conformant
1 def process_data(d):
2 if d != None:
3 for i in range(len(d)):
4 print("Processing item: " + str(d[i]))
5 if d[i] > 100:
6 return False
7 return True
8
9 def main():
10 lst = [10, 20, 150, 40]
11 process_data(lst)
Corrected Output (Clean AST)
Standardized
1 def process_data(data: list) -> bool:
2 if data is None:
3 return True
4
5 for item in data:
6 print(f"Processing item: {item}")
7 if item > 100:
8 return False
9 return True
10
11 def main():
12 data_list = [10, 20, 150, 40]
13 process_data(data_list)
AST Transformation Graph
Visualizing node replacement strategy (Red = Removed, Green = Added)
Module
Import
Fn
Main
If
Dirty
→
Guard
Clean
Graph Memory Copy Algorithm Active: Node Replaced
Violations Detected
| Line | Type | Standard |
|---|---|---|
| 2 | Style | Use 'is None' instead of '!= None' |
| 3 | Structure | Prefer direct iteration over range(len()) |
| 4 | Perf | Use f-strings for string concatenation |
| 10 | Naming | Variable names should be descriptive |