Skip to content

style: enable ModifierOrder in checkstyle #5132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@

<!-- Modifier Checks -->
<!-- See https://checkstyle.org/checks/modifier/index.html -->
<!-- TODO <module name="ModifierOrder"/> -->
<module name="ModifierOrder"/>
<!-- TODO <module name="RedundantModifier"/> -->

<!-- Checks for blocks. You know, those {}'s -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public final class HighestSetBit {
private HighestSetBit() {
}

public final static Optional<Integer> findHighestSetBit(int num) {
public static Optional<Integer> findHighestSetBit(int num) {
if (num < 0) {
throw new IllegalArgumentException("Input cannot be negative");
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/others/CountWords.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @author Marcus
*/
final public class CountWords {
public final class CountWords {
private CountWords() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @brief utility class for <a href="https://en.wikipedia.org/wiki/Euler%27s_totient_function">Euler's totient function</a>
*/
final public class EulersFunction {
public final class EulersFunction {
private EulersFunction() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @brief Class for finding the lowest base in which a given integer is a palindrome.
cf. https://oeis.org/A016026
*/
final public class LowestBasePalindrome {
public final class LowestBasePalindrome {
private LowestBasePalindrome() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/**
* @brief utility class implementing <a href="https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes">Sieve of Eratosthenes</a>
*/
final public class SieveOfEratosthenes {
public final class SieveOfEratosthenes {
private SieveOfEratosthenes() {
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.others.cn;

final public class HammingDistance {
public final class HammingDistance {
private HammingDistance() {
}

Expand Down