mirror of https://github.com/aminya/setup-cpp
fix: use cppcheck 2.7 on Windows
This commit is contained in:
parent
e70583e34a
commit
029a5fc9f9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,10 +1,11 @@
|
||||||
import { setupCppcheck } from "../cppcheck"
|
import { setupCppcheck } from "../cppcheck"
|
||||||
import { testBin } from "../../utils/tests/test-helpers"
|
import { testBin } from "../../utils/tests/test-helpers"
|
||||||
|
import { getVersion } from "../../default_versions"
|
||||||
|
|
||||||
jest.setTimeout(300000)
|
jest.setTimeout(300000)
|
||||||
describe("setup-cppcheck", () => {
|
describe("setup-cppcheck", () => {
|
||||||
it("should setup cppcheck", async () => {
|
it("should setup cppcheck", async () => {
|
||||||
const installInfo = await setupCppcheck("", "", process.arch)
|
const installInfo = await setupCppcheck(getVersion("cppcheck", undefined), "", process.arch)
|
||||||
|
|
||||||
await testBin("cppcheck", ["--version"], installInfo.binDir)
|
await testBin("cppcheck", ["--version"], installInfo.binDir)
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
import { Inputs, Opts } from "./main"
|
import { Inputs, Opts } from "./main"
|
||||||
|
|
||||||
|
// passing "" to a tool installed by a package manager (apt, brew, choco) will result in the default version of that package manager.
|
||||||
|
// the directly downloaded tools require a given version ("" doesn't work).
|
||||||
|
|
||||||
const DefaultVersions: Record<string, string> = {
|
const DefaultVersions: Record<string, string> = {
|
||||||
llvm: "13.0.0", // https://github.com/llvm/llvm-project/releases
|
llvm: "13.0.0", // https://github.com/llvm/llvm-project/releases
|
||||||
clangtidy: "13.0.0",
|
clangtidy: "13.0.0",
|
||||||
|
@ -9,11 +12,12 @@ const DefaultVersions: Record<string, string> = {
|
||||||
gcovr: "5.1", // https://pypi.org/project/gcovr/
|
gcovr: "5.1", // https://pypi.org/project/gcovr/
|
||||||
conan: "1.48.0", // https://github.com/conan-io/conan/releases
|
conan: "1.48.0", // https://github.com/conan-io/conan/releases
|
||||||
meson: "0.62.1", // https://github.com/mesonbuild/meson/releases
|
meson: "0.62.1", // https://github.com/mesonbuild/meson/releases
|
||||||
python: "3.8.10",
|
python: "3.8.10", // semver
|
||||||
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
|
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
|
||||||
task: "3.12.1", // https://github.com/go-task/task/releases
|
task: "3.12.1", // https://github.com/go-task/task/releases
|
||||||
doxygen: process.platform === "darwin" ? "1.9.3" : "1.9.4", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
|
doxygen: process.platform === "darwin" ? "1.9.3" : "1.9.4", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen
|
||||||
gcc: "11", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
|
gcc: "11", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
|
||||||
|
cppcheck: process.platform === "win32" ? "2.7" : "",
|
||||||
}
|
}
|
||||||
|
|
||||||
/// If an ubuntu versions is not in this map:
|
/// If an ubuntu versions is not in this map:
|
||||||
|
@ -24,16 +28,19 @@ const DefaultUbuntuVersion: Record<string, Record<number, string>> = {
|
||||||
20: "13.0.0-ubuntu-20.04",
|
20: "13.0.0-ubuntu-20.04",
|
||||||
18: "13.0.1-ubuntu-18.04",
|
18: "13.0.1-ubuntu-18.04",
|
||||||
16: "13.0.0-ubuntu-16.04",
|
16: "13.0.0-ubuntu-16.04",
|
||||||
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
clangtidy: {
|
clangtidy: {
|
||||||
20: "13.0.0-ubuntu-20.04",
|
20: "13.0.0-ubuntu-20.04",
|
||||||
18: "13.0.1-ubuntu-18.04",
|
18: "13.0.1-ubuntu-18.04",
|
||||||
16: "13.0.0-ubuntu-16.04",
|
16: "13.0.0-ubuntu-16.04",
|
||||||
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
clangformat: {
|
clangformat: {
|
||||||
20: "13.0.0-ubuntu-20.04",
|
20: "13.0.0-ubuntu-20.04",
|
||||||
18: "13.0.1-ubuntu-18.04",
|
18: "13.0.1-ubuntu-18.04",
|
||||||
16: "13.0.0-ubuntu-16.04",
|
16: "13.0.0-ubuntu-16.04",
|
||||||
|
14: "13.0.0-ubuntu-16.04",
|
||||||
},
|
},
|
||||||
gcovr: {
|
gcovr: {
|
||||||
20: "5.1",
|
20: "5.1",
|
||||||
|
|
Loading…
Reference in New Issue