Skip to content

Commit 029a5fc

Browse files
committed
fix: use cppcheck 2.7 on Windows
1 parent e70583e commit 029a5fc

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

dist/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cppcheck/__tests__/cppcheck.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { setupCppcheck } from "../cppcheck"
22
import { testBin } from "../../utils/tests/test-helpers"
3+
import { getVersion } from "../../default_versions"
34

45
jest.setTimeout(300000)
56
describe("setup-cppcheck", () => {
67
it("should setup cppcheck", async () => {
7-
const installInfo = await setupCppcheck("", "", process.arch)
8+
const installInfo = await setupCppcheck(getVersion("cppcheck", undefined), "", process.arch)
89

910
await testBin("cppcheck", ["--version"], installInfo.binDir)
1011
})

src/default_versions.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { Inputs, Opts } from "./main"
22

3+
// passing "" to a tool installed by a package manager (apt, brew, choco) will result in the default version of that package manager.
4+
// the directly downloaded tools require a given version ("" doesn't work).
5+
36
const DefaultVersions: Record<string, string> = {
47
llvm: "13.0.0", // https://github.com/llvm/llvm-project/releases
58
clangtidy: "13.0.0",
@@ -9,11 +12,12 @@ const DefaultVersions: Record<string, string> = {
912
gcovr: "5.1", // https://pypi.org/project/gcovr/
1013
conan: "1.48.0", // https://github.com/conan-io/conan/releases
1114
meson: "0.62.1", // https://github.com/mesonbuild/meson/releases
12-
python: "3.8.10",
15+
python: "3.8.10", // semver
1316
kcov: "40", // https://github.com/SimonKagstrom/kcov/releases
1417
task: "3.12.1", // https://github.com/go-task/task/releases
1518
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
1619
gcc: "11", // https://github.com/brechtsanders/winlibs_mingw/releases and // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=gcc
20+
cppcheck: process.platform === "win32" ? "2.7" : "",
1721
}
1822

1923
/// If an ubuntu versions is not in this map:
@@ -24,16 +28,19 @@ const DefaultUbuntuVersion: Record<string, Record<number, string>> = {
2428
20: "13.0.0-ubuntu-20.04",
2529
18: "13.0.1-ubuntu-18.04",
2630
16: "13.0.0-ubuntu-16.04",
31+
14: "13.0.0-ubuntu-16.04",
2732
},
2833
clangtidy: {
2934
20: "13.0.0-ubuntu-20.04",
3035
18: "13.0.1-ubuntu-18.04",
3136
16: "13.0.0-ubuntu-16.04",
37+
14: "13.0.0-ubuntu-16.04",
3238
},
3339
clangformat: {
3440
20: "13.0.0-ubuntu-20.04",
3541
18: "13.0.1-ubuntu-18.04",
3642
16: "13.0.0-ubuntu-16.04",
43+
14: "13.0.0-ubuntu-16.04",
3744
},
3845
gcovr: {
3946
20: "5.1",

0 commit comments

Comments
 (0)