Skip to content

Commit b78e460

Browse files
committed
feat: add support for lizard
1 parent 19a213d commit b78e460

File tree

9 files changed

+31
-7
lines changed

9 files changed

+31
-7
lines changed

action.yml

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ inputs:
6161
flawfinder:
6262
description: "Wether to install flawfinder (true/false) or the specific version to install."
6363
required: false
64+
lizard:
65+
description: "Wether to install lizard (true/false) or the specific version to install."
66+
required: false
6467
clang-tidy:
6568
description: "Wether to install clang-tidy (true/false) or the specific version to install."
6669
required: false

dist/legacy/setup-cpp.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.mjs

+1-1
Large diffs are not rendered by default.

dist/modern/setup-cpp.mjs.map

+1-1
Large diffs are not rendered by default.

src/cli-options.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ All the available tools:
3333
console.table(
3434
{
3535
"compiler and analyzer": {
36-
tools: "--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format, --cpplint, --flawfinder",
36+
tools:
37+
"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format, --cpplint, --flawfinder, --lizard",
3738
},
3839
"build system": {
3940
tools: "--cmake, --ninja, --meson, --make, --task, --bazel, --cmakelang, --cmake-lint, --cmake-format",

src/lizard/__tests__/lizard.test.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
2+
import { testBin } from "../../utils/tests/test-helpers.js"
3+
import { getVersion } from "../../versions/versions.js"
4+
import { setupLizard } from "../lizard.js"
5+
6+
jest.setTimeout(300000)
7+
describe("setup-lizard", () => {
8+
it("should setup lizard", async () => {
9+
const installInfo = await setupLizard(getVersion("lizard", "true", await ubuntuVersion()), "", process.arch)
10+
await testBin("lizard", ["--version"], installInfo.binDir)
11+
})
12+
})

src/lizard/lizard.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { setupPipPack } from "../utils/setup/setupPipPack.js"
2+
3+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
4+
export function setupLizard(version: string | undefined, _setupDir: string, _arch: string) {
5+
return setupPipPack("lizard", version)
6+
}

src/tool.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ import { setupCmake } from "./cmake/cmake.js"
66
import { setupCmakelang } from "./cmakelang/cmakelang.js"
77
import { setupConan } from "./conan/conan.js"
88
import { setupCppcheck } from "./cppcheck/cppcheck.js"
9+
import { setupCpplint } from "./cpplint/cpplint.js"
910
import { setupDoxygen } from "./doxygen/doxygen.js"
11+
import { setupFlawfinder } from "./flawfinder/flawfinder.js"
1012
import { setupGcc, setupMingw } from "./gcc/gcc.js"
1113
import { setupGcovr } from "./gcovr/gcovr.js"
1214
import { setupGraphviz } from "./graphviz/graphviz.js"
1315
import { setupKcov } from "./kcov/kcov.js"
16+
import { setupLizard } from "./lizard/lizard.js"
1417
import { setupAppleClang } from "./llvm/apple-clang.js"
1518
import { setupClangFormat, setupClangTools, setupLLVM } from "./llvm/llvm.js"
1619
import { setupMake } from "./make/make.js"
@@ -26,8 +29,6 @@ import { setupSevenZip } from "./sevenzip/sevenzip.js"
2629
import { setupTask } from "./task/task.js"
2730
import { setupVcpkg } from "./vcpkg/vcpkg.js"
2831
import { setupVCVarsall } from "./vcvarsall/vcvarsall.js"
29-
import { setupCpplint } from "./cpplint/cpplint.js"
30-
import { setupFlawfinder } from "./flawfinder/flawfinder.js"
3132

3233
export const llvmSetups = { llvm: setupLLVM, clang: setupLLVM, "clang++": setupLLVM } as const
3334
export const gccSetups = { gcc: setupGcc, "g++": setupGcc } as const
@@ -85,6 +86,7 @@ export const setups = {
8586
cppcheck: setupCppcheck,
8687
cpplint: setupCpplint,
8788
flawfinder: setupFlawfinder,
89+
lizard: setupLizard,
8890
"clang-tidy": setupClangTools,
8991
clangtidy: setupClangTools,
9092
"clang-format": setupClangFormat,

0 commit comments

Comments
 (0)