@@ -10,8 +10,7 @@ def analyze_file(file_path: str, selected_stats: Optional[List[str]] = None) ->
1010 Args:
1111 file_path (str): Path to the file to analyze
1212 selected_stats (list, optional): List of stats to compute. If None, compute all stats.
13- Valid stats are: "line_count", "function_count", "comment_line_count",
14- "inline_comment_count", "indentation_level"
13+ Valid stats are: "line_count", "function_count", "comment_line_count", "indentation_level"
1514
1615 Returns:
1716 dict: Dictionary containing the requested stats and file information
@@ -35,7 +34,7 @@ def analyze_file(file_path: str, selected_stats: Optional[List[str]] = None) ->
3534 raise ValueError ("File has no extension" )
3635
3736 # Define valid stats
38- valid_stats = ["line_count" , "function_count" , "comment_line_count" , "inline_comment_count" , " indentation_level" ]
37+ valid_stats = ["line_count" , "function_count" , "comment_line_count" , "indentation_level" ]
3938
4039 # default to all stats if none specified
4140 if selected_stats is None :
@@ -72,14 +71,6 @@ def analyze_file(file_path: str, selected_stats: Optional[List[str]] = None) ->
7271 lexer = LexerClass (source_code = code ) # Pass source_code explicitly
7372 results ["comment_line_count" ] = count_comment_lines (file_path )
7473
75- # inline comment count if requested
76- if "inline_comment_count" in selected_stats :
77- from spice .analyzers .count_inline_comments import count_inline_comments
78- from utils .get_lexer import get_lexer_for_file
79- LexerClass = get_lexer_for_file (file_path )
80- lexer = LexerClass (source_code = code ) # Pass source_code explicitly
81- results ["inline_comment_count" ] = count_inline_comments (file_path )
82-
8374 # indentation analysis if requested
8475 if "indentation_level" in selected_stats :
8576 indentation_info = detect_indentation (code )
0 commit comments