diff --git a/linters/squawk/plugin.yaml b/linters/squawk/plugin.yaml index 013084ff0..23ad5f8ac 100644 --- a/linters/squawk/plugin.yaml +++ b/linters/squawk/plugin.yaml @@ -4,8 +4,8 @@ tools: - name: squawk runtime: node package: squawk-cli - # First version to include Windows install. - known_good_version: 1.2.0 + # First version to include Windows install and linux arm64 + known_good_version: 1.4.0 shims: [squawk] lint: definitions: @@ -13,7 +13,7 @@ lint: description: A linter for Postgres migrations files: [sql] tools: [squawk] - known_good_version: 1.2.0 + known_good_version: 1.4.0 suggest_if: config_present direct_configs: [.squawk.toml] commands: diff --git a/linters/squawk/squawk.test.ts b/linters/squawk/squawk.test.ts index 84ccbe43a..f279b9c19 100644 --- a/linters/squawk/squawk.test.ts +++ b/linters/squawk/squawk.test.ts @@ -1,7 +1,12 @@ +import semver from "semver"; import { linterCheckTest } from "tests"; -// No release for squawk on arm64 linux https://github.com/sbdchd/squawk/issues/372 +// Squawk first supported linux arm in 1.4.0 https://github.com/sbdchd/squawk/issues/372 linterCheckTest({ linterName: "squawk", - skipTestIf: () => process.arch === "arm64" && process.platform === "linux", + skipTestIf: (version) => + process.arch === "arm64" && + process.platform === "linux" && + version !== undefined && + semver.lt(version, "1.4.0"), }); diff --git a/linters/squawk/test_data/squawk_v1.1.2_basic.check.shot b/linters/squawk/test_data/squawk_v1.4.0_basic.check.shot similarity index 100% rename from linters/squawk/test_data/squawk_v1.1.2_basic.check.shot rename to linters/squawk/test_data/squawk_v1.4.0_basic.check.shot