Skip to content

Commit

Permalink
feat(go): Add golangcilint as default linter (#1213)
Browse files Browse the repository at this point in the history
* Add golangci linter to go pack

Update readme

* add missing mason and none-ls configuration

---------

Co-authored-by: Micah Halter <micah.halter@gtri.gatech.edu>
  • Loading branch information
shivanthzen and mehalter authored Sep 20, 2024
1 parent 053f3d2 commit 2467e24
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions lua/astrocommunity/pack/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ This plugin pack does the following:
- [impl](https://github.com/josharian/impl)
- Adds [nvim-dap-go](https://github.com/leoluz/nvim-dap-go) for debugging
- Adds [gopher.nvim](https://github.com/olexsmir/gopher.nvim) for language specific tools
- Adds [golangcilint](https://github.com/golangci/golangci-lint) for linting
13 changes: 11 additions & 2 deletions lua/astrocommunity/pack/go/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ return {
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(
opts.ensure_installed,
{ "gomodifytags", "iferr", "impl", "gotests", "goimports" }
{ "gomodifytags", "iferr", "impl", "gotests", "goimports", "golangci_lint" }
)
end,
},
Expand All @@ -90,7 +90,7 @@ return {
opts = function(_, opts)
opts.ensure_installed = require("astrocore").list_insert_unique(
opts.ensure_installed,
{ "delve", "gopls", "gomodifytags", "gotests", "iferr", "impl", "goimports" }
{ "delve", "gopls", "gomodifytags", "gotests", "iferr", "impl", "goimports", "golangci-lint" }
)
end,
},
Expand Down Expand Up @@ -155,4 +155,13 @@ return {
},
},
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
go = { "golangcilint" },
},
},
},
}

0 comments on commit 2467e24

Please sign in to comment.