fix: calculate tools using Object.keys + fix linting for python-pygments

This commit is contained in:
Amin Yahyaabadi 2022-11-02 20:55:26 -07:00
parent 73a098f0c6
commit d2f3163daf
5 changed files with 8 additions and 40 deletions

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

View File

@ -80,35 +80,7 @@ const setups = {
} }
/** The tools that can be installed */ /** The tools that can be installed */
const tools: Array<keyof typeof setups> = [ const tools = Object.keys(setups) as Array<keyof typeof setups>
"nala",
"choco",
"brew",
"python",
"powershell",
"vcpkg",
"bazel",
"cmake",
"ninja",
"conan",
"meson",
"gcovr",
"opencppcoverage",
"ccache",
"doxygen",
"graphviz",
"cppcheck",
"clangtidy",
"clangformat",
"llvm",
"gcc",
"msvc",
"vcvarsall",
"kcov",
"make",
"task",
"sevenzip",
]
/** The possible inputs to the program */ /** The possible inputs to the program */
export type Inputs = keyof typeof setups | "compiler" | "architecture" export type Inputs = keyof typeof setups | "compiler" | "architecture"
@ -158,13 +130,9 @@ export async function main(args: string[]): Promise<number> {
let hasLLVM = false // used to unset CPPFLAGS of LLVM when other compilers are used as the main compiler let hasLLVM = false // used to unset CPPFLAGS of LLVM when other compilers are used as the main compiler
// install python-pygments to avoid conflicts with cppcheck and gcovr on arch linux if (isArch() && typeof opts.cppcheck === "string" && typeof opts.gcovr === "string") {
if (process.platform === "linux") { info("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux")
if (isArch()) { setupPacmanPack("python-pygments")
if (opts.cppcheck && opts.gcovr) {
setupPacmanPack("python-pygments")
}
}
} }
// loop over the tools and run their setup function // loop over the tools and run their setup function