File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed
Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ IndentFunctionDeclarationAfterType: false
4949IndentWidth : 4
5050IndentWrappedFunctionNames : false
5151IndentRequiresClause : true
52- InsertNewlineAtEOF : true
5352RequiresClausePosition : OwnLine
5453KeepEmptyLinesAtTheStartOfBlocks : false
5554MaxEmptyLinesToKeep : 1
Original file line number Diff line number Diff line change @@ -44,13 +44,7 @@ def replace_json(match):
4444
4545
4646def fix_indentation (cpp_content : str ) -> str :
47- # Handle edge case: if content doesn't contain JSON patterns, return unchanged
48- if "JSON(" not in cpp_content :
49- return cpp_content
50-
5147 lines = cpp_content .splitlines ()
52- # Preserve original ending - check if original content ended with newline
53- ends_with_newline = cpp_content .endswith ('\n ' )
5448
5549 def find_indentation (line : str ) -> int :
5650 return len (line ) - len (line .lstrip ())
@@ -72,11 +66,7 @@ def find_indentation(line: str) -> int:
7266 break
7367 lines [i ] = lines [i ][by_how_much :] if by_how_much > 0 else " " * (- by_how_much ) + lines [i ]
7468
75- result = "\n " .join (lines )
76- # Only add newline if original content had one
77- if ends_with_newline :
78- result += "\n "
79- return result
69+ return "\n " .join (lines ) + "\n "
8070
8171
8272def process_file (file_path : Path , dry_run : bool ) -> bool :
You can’t perform that action at this time.
0 commit comments