Add automatic linter (#4214)

This commit is contained in:
acbin
2023-06-09 20:05:14 +08:00
committed by GitHub
parent 00282efd8b
commit 415a04ea7f
188 changed files with 661 additions and 1133 deletions

View File

@ -30,8 +30,7 @@ public class AnyBaseToAnyBase {
try {
System.out.print("Enter number: ");
n = in.next();
System.out.print("Enter beginning base (between " + MINIMUM_BASE + " and "
+ MAXIMUM_BASE + "): ");
System.out.print("Enter beginning base (between " + MINIMUM_BASE + " and " + MAXIMUM_BASE + "): ");
b1 = in.nextInt();
if (b1 > MAXIMUM_BASE || b1 < MINIMUM_BASE) {
System.out.println("Invalid base!");
@ -41,8 +40,7 @@ public class AnyBaseToAnyBase {
System.out.println("The number is invalid for this base!");
continue;
}
System.out.print(
"Enter end base (between " + MINIMUM_BASE + " and " + MAXIMUM_BASE + "): ");
System.out.print("Enter end base (between " + MINIMUM_BASE + " and " + MAXIMUM_BASE + "): ");
b2 = in.nextInt();
if (b2 > MAXIMUM_BASE || b2 < MINIMUM_BASE) {
System.out.println("Invalid base!");

View File

@ -22,8 +22,7 @@ public class DecimalToAnyBase {
System.out.println("Decimal Input"
+ " is: " + decInput);
System.out.println("Value of " + decInput + " in base " + base
+ " is: " + convertToAnyBase(decInput, base));
System.out.println("Value of " + decInput + " in base " + base + " is: " + convertToAnyBase(decInput, base));
br.close();
}

View File

@ -61,8 +61,7 @@ public class HexToOct {
hexadecnum = scan.nextLine();
// first convert hexadecimal to decimal
decnum = hex2decimal(
hexadecnum); // Pass the string to the hex2decimal function and get the decimal form in
decnum = hex2decimal(hexadecnum); // Pass the string to the hex2decimal function and get the decimal form in
// variable decnum
// convert decimal to octal

View File

@ -126,8 +126,7 @@ public class RgbHsvConversion {
return bHue && bSaturation && bValue;
}
private static int[] getRgbBySection(
double hueSection, double chroma, double matchValue, double secondLargestComponent) {
private static int[] getRgbBySection(double hueSection, double chroma, double matchValue, double secondLargestComponent) {
int red;
int green;
int blue;

View File

@ -58,8 +58,7 @@ public class TurkishToLatinConversion {
'G',
};
for (int i = 0; i < turkishChars.length; i++) {
param = param.replaceAll(
new String(new char[] {turkishChars[i]}), new String(new char[] {latinChars[i]}));
param = param.replaceAll(new String(new char[] {turkishChars[i]}), new String(new char[] {latinChars[i]}));
}
return param;
}