Skip to content

Commit f010a47

Browse files
vil02debasishbsws
andauthored
chore: enforce InsertNewlineAtEOF in clang-format (#4343)
* style: insert newline at eof * style: use `InsertNewlineAtEOF` in `clang-format` * fix: use `clang-format-16` * chore: update clang-format-lint-action to v0.16.2 --------- Co-authored-by: Debasish Biswas <[email protected]>
1 parent 78ca465 commit f010a47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+43
-42
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ IndentGotoLabels: true
8383
IndentPPDirectives: None
8484
IndentWidth: 4
8585
IndentWrappedFunctionNames: false
86+
InsertNewlineAtEOF: true
8687
JavaScriptQuotes: Leave
8788
JavaScriptWrapImports: true
8889
KeepEmptyLinesAtTheStartOfBlocks: true

.github/workflows/clang-format-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v3
12-
- uses: DoozyX/clang-format-lint-action@v0.13
12+
- uses: DoozyX/clang-format-lint-action@v0.16.2
1313
with:
1414
source: './src'
1515
extensions: 'java'
16-
clangFormatVersion: 12
16+
clangFormatVersion: 16

src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,4 @@ public static List<List<Integer>> allPathsFromSourceToTarget(int vertices, int[]
9898
return nm;
9999
// returns all possible paths from source to destination
100100
}
101-
}
101+
}

src/main/java/com/thealgorithms/backtracking/ArrayCombination.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ public static List<TreeSet<Integer>> combination(int n, int k) {
2626
}
2727
return Combination.combination(arr, length);
2828
}
29-
}
29+
}

src/main/java/com/thealgorithms/bitmanipulation/IndexOfRightMostSetBit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ public static int indexOfRightMostSetBit(int n) {
2525

2626
return index;
2727
}
28-
}
28+
}

src/main/java/com/thealgorithms/bitmanipulation/IsEven.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ public class IsEven {
99
public static boolean isEven(int number) {
1010
return (number & 1) == 0;
1111
}
12-
}
12+
}

src/main/java/com/thealgorithms/bitmanipulation/NonRepeatingNumberFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ public static int findNonRepeatingNumber(int[] arr) {
1414
}
1515
return result;
1616
}
17-
}
17+
}

src/main/java/com/thealgorithms/bitmanipulation/NumbersDifferentSigns.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ public class NumbersDifferentSigns {
1010
public static boolean differentSigns(int num1, int num2) {
1111
return (num1 ^ num2) < 0;
1212
}
13-
}
13+
}

src/main/java/com/thealgorithms/bitmanipulation/ReverseBits.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ public static int reverseBits(int n) {
1717
}
1818
return result;
1919
}
20-
}
20+
}

src/main/java/com/thealgorithms/datastructures/heaps/LeftistHeap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ private void in_order_aux(Node n, ArrayList<Integer> lst) {
111111
lst.add(n.element);
112112
in_order_aux(n.right, lst);
113113
}
114-
}
114+
}

0 commit comments

Comments
 (0)