mason.nvim
mason.nvim copied to clipboard
feat(registry): add cppcheck linter
Add cppcheck to the registry.
Since there is no official binary release for Linux, using make to compile it, suggestions and alternatives are welcomed.
This closes #353
@williambotman /apply
diff --git a/lua/mason-registry/cppcheck/init.lua b/lua/mason-registry/cppcheck/init.lua
index 85f70527..7a60a839 100644
--- a/lua/mason-registry/cppcheck/init.lua
+++ b/lua/mason-registry/cppcheck/init.lua
@@ -2,10 +2,14 @@ local Pkg = require "mason-core.package"
local Optional = require "mason-core.optional"
local git = require "mason-core.managers.git"
local github = require "mason-core.managers.github"
+local _ = require "mason-core.functional"
return Pkg.new {
name = "cppcheck",
- desc = [[ Cppcheck is an analysis tool for C/C++ code. It detects the types of bugs that the compilers normally fail to detect. The goal is no false positives. ]],
+ desc = _.dedent [[
+ Cppcheck is an analysis tool for C/C++ code. It detects the types of bugs that the compilers normally fail to
+ detect. The goal is no false positives.
+ ]],
homepage = "https://cppcheck.sourceforge.io/",
languages = { Pkg.Lang.C, Pkg.Lang["C++"] },
categories = { Pkg.Cat.Linter },
I did not mean to force push, any way to undo this?
I still have the changes in my local repository, will reopen the PR.
I did not mean to force push, any way to undo this?
I still have the changes in my local repository, will reopen the PR.
Ah no worries, cool :+1:. I've waited with merging this for now because I'd like to manually revise the install script and potentially harden it a bit more. Generally I try to avoid custom "low-level" install scripts due to difficulties in ensuring sufficient cross-platform support. The more long-term sustainable option for the time being might be to advise people to manage such packages elsewhere (cppcheck for instance seems to have broad support among real package managers)
Hey @VanillaBase1lb I've not forgotten about this PR. I have however struggled to build this on some systems but have not yet had time to look into it more closely.
No worries. Regarding not being able to build on some systems, is it an upstream(cppcheck) issue or something to do with Mason.nvim? Maybe we could help if there is more info on this.
Closing this as packages are no longer added to this registry, see instead https://github.com/mason-org/mason-registry/.