mirror of https://github.com/aminya/setup-cpp
feat: add support for cpplint
This commit is contained in:
parent
c60a5ed965
commit
aae4991f09
|
@ -15,8 +15,8 @@ Setting up a **cross-platform** environment for building and testing C++/C proje
|
|||
`setup-cpp` is **modular** and you can choose to install any of these tools:
|
||||
|
||||
| category | tools |
|
||||
| --------------------- | --------------------------------------------------------------------------- |
|
||||
| compiler and analyzer | llvm, gcc, msvc, apple-clang, vcvarsall, cppcheck, clang-tidy, clang-format |
|
||||
| --------------------- | ------------------------------------------------------------------------------------ |
|
||||
| compiler and analyzer | llvm, gcc, msvc, apple-clang, vcvarsall, cppcheck, clang-tidy, clang-format, cpplint |
|
||||
| build system | cmake, ninja, meson, make, task, bazel, cmakelang, cmake-format, cmake-lint |
|
||||
| package manager | vcpkg, conan, choco, brew, nala |
|
||||
| cache | ccache, sccache |
|
||||
|
|
|
@ -55,6 +55,9 @@ inputs:
|
|||
cppcheck:
|
||||
description: "Wether to install cppcheck (true/false) or the specific version to install."
|
||||
required: false
|
||||
cpplint:
|
||||
description: "Wether to install cpplint (true/false) or the specific version to install."
|
||||
required: false
|
||||
clang-tidy:
|
||||
description: "Wether to install clang-tidy (true/false) or the specific version to install."
|
||||
required: false
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -33,7 +33,7 @@ All the available tools:
|
|||
console.table(
|
||||
{
|
||||
"compiler and analyzer": {
|
||||
tools: "--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format",
|
||||
tools: "--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format, --cpplint",
|
||||
},
|
||||
"build system": {
|
||||
tools: "--cmake, --ninja, --meson, --make, --task, --bazel, --cmakelang, --cmake-lint, --cmake-format",
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
import { ubuntuVersion } from "../../utils/env/ubuntu_version.js"
|
||||
import { testBin } from "../../utils/tests/test-helpers.js"
|
||||
import { getVersion } from "../../versions/versions.js"
|
||||
import { setupCpplint } from "../cpplint.js"
|
||||
|
||||
jest.setTimeout(300000)
|
||||
describe("setup-cpplint", () => {
|
||||
it("should setup cpplint", async () => {
|
||||
const installInfo = await setupCpplint(getVersion("cpplint", "true", await ubuntuVersion()), "", process.arch)
|
||||
await testBin("cpplint", ["--version"], installInfo.binDir)
|
||||
})
|
||||
})
|
|
@ -0,0 +1,6 @@
|
|||
import { setupPipPack } from "../utils/setup/setupPipPack.js"
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export function setupCpplint(version: string | undefined, _setupDir: string, _arch: string) {
|
||||
return setupPipPack("cpplint", version)
|
||||
}
|
|
@ -26,6 +26,7 @@ import { setupSevenZip } from "./sevenzip/sevenzip.js"
|
|||
import { setupTask } from "./task/task.js"
|
||||
import { setupVcpkg } from "./vcpkg/vcpkg.js"
|
||||
import { setupVCVarsall } from "./vcvarsall/vcvarsall.js"
|
||||
import { setupCpplint } from "./cpplint/cpplint.js"
|
||||
|
||||
export const llvmSetups = { llvm: setupLLVM, clang: setupLLVM, "clang++": setupLLVM } as const
|
||||
export const gccSetups = { gcc: setupGcc, "g++": setupGcc } as const
|
||||
|
@ -81,6 +82,7 @@ export const setups = {
|
|||
doxygen: setupDoxygen,
|
||||
graphviz: setupGraphviz,
|
||||
cppcheck: setupCppcheck,
|
||||
cpplint: setupCpplint,
|
||||
"clang-tidy": setupClangTools,
|
||||
clangtidy: setupClangTools,
|
||||
"clang-format": setupClangFormat,
|
||||
|
|
Loading…
Reference in New Issue