Only check checkstyle arguments on Linux

This commit is contained in:
Erik C. Thauvin 2025-03-25 11:58:26 -07:00
parent 4e373bfd10
commit ccc04bf81d
Signed by: erik
GPG key ID: 776702A6A2DA330E
2 changed files with 11 additions and 4 deletions

View file

@ -23,6 +23,7 @@ import rife.bld.publish.PublishLicense;
import rife.bld.publish.PublishScm;
import java.util.List;
import java.util.Locale;
import static rife.bld.dependencies.Repository.*;
import static rife.bld.dependencies.Scope.compile;
@ -99,10 +100,13 @@ public class CheckstyleOperationBuild extends Project {
@Override
public void test() throws Exception {
new ExecOperation()
.fromProject(this)
.command("scripts/cliargs.sh")
.execute();
var os = System.getProperty("os.name");
if (os != null && os.toLowerCase(Locale.US).contains("linux")) {
new ExecOperation()
.fromProject(this)
.command("scripts/cliargs.sh")
.execute();
}
super.test();
}
}

View file

@ -19,6 +19,8 @@ package rife.bld.extension;
import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.condition.OS;
import rife.bld.BaseProject;
import rife.bld.Project;
import rife.bld.WebProject;
@ -65,6 +67,7 @@ class CheckstyleOperationTest {
}
@Test
@EnabledOnOs(OS.LINUX)
void checkAllParameters() throws IOException {
var args = Files.readAllLines(Paths.get("src", "test", "resources", "checkstyle-args.txt"));