News for hackers. Stuff that matters.
Re:Being a bash developer in the 21st century by keepamovin on Friday September 22, 2023 @03:42AM (#37609104)
Yes! I only wish there was a better interface. Like an editor integration. Just something where you can go through each check line 1 by 1 and consider changing or not. I tried writing this in a simple way but gave up...
Re:Being a bash developer in the 21st century by wodenokoto on Friday September 22, 2023 @04:39AM (#37609524)
I don't know which editor you are using, but the shellcheck plugin for VS Code works really well. Underlines warnings and errors, and on hover gives you a short description and a link to a long description. There's also a "fix" button, but I it only works for the simplest of cases.
Re:Being a bash developer in the 21st century by keepamovin on Friday September 22, 2023 @06:06AM (#37610102)
Oh, I use vim. And I don't really know about any plugins that work.

But I would try VS Code just to go through my shell files with shellcheck! :)

Re:Being a bash developer in the 21st century by marcelarie on Friday September 22, 2023 @06:28AM (#37610258)
you can use nvim then, it has shellcheck for diagnostics and formatting, like in vscode :)

here the link to the config: https://github.com/jose-elias-alvarez/null-ls.nvim/blob/main...

Re:Being a bash developer in the 21st century by keepamovin on Friday September 22, 2023 @06:39AM (#37610323)
Thanks, for the link, man! Helpful. Is nvim, like, command line? I don't like to be in GUI when I'm coding. I mean I guess I could hook up my Quake style iTerm2 dropdown overlay to display a GUI window (but I think that only works on Windows with ConEmu). It's just easier for me to stay in command line, switch to GUI to eval or research...or watch videos! Haha
Re:Being a bash developer in the 21st century by llimllib on Friday September 22, 2023 @07:19AM (#37610548)
nvim is a fork of vim, so yes it’s a command line editor
Re:Being a bash developer in the 21st century by keepamovin on Friday September 22, 2023 @07:28AM (#37610617)
Cool! Will give a try.
Re:Being a bash developer in the 21st century by ramses0 on Friday September 22, 2023 @12:33PM (#37614152)
Syntastic, I think? `~/.vim/pack/default/start/syntastic/README.markdown`
Re:Being a bash developer in the 21st century by FredrikMeyer on Friday September 22, 2023 @04:30AM (#37609462)
Emacs' flycheck integrates perfectly with shellcheck.
Re:Being a bash developer in the 21st century by frou_dh on Friday September 22, 2023 @03:51AM (#37609165)
Use the editor's normal support for running a build/compile to run shellcheck with the `--format gcc` flag. Shellcheck will output in the traditional path:line:column:message format, which will be navigable like compiler errors.
Re:Being a bash developer in the 21st century by BozeWolf on Friday September 22, 2023 @04:04AM (#37609247)
Jetbrains has shellcheck integrated in their editors:)

I bet vscode can do the same.

Re:Being a bash developer in the 21st century by JCWasmx86 on Friday September 22, 2023 @05:11AM (#37609738)
A lot of editors have available integrations for Shellcheck. VSCode and IntelliJ have a plugin, GNOME Builder comes with the plugin included, etc.
Re:Being a bash developer in the 21st century by marcelarie on Friday September 22, 2023 @06:30AM (#37610269)
In neovim I would recommend setting shellcheck with null.ls or using the bash language server: https://github.com/bash-lsp/bash-language-server

both work really well