shellcheck plugin wanted
Not sure if this is the correct place, I have been using Notepad++ for years, currently using 64bit version. I love using Notepad++ for bash scripting, some other heavier and not so elegant text IDEs have support for shellcheck but Notepad++ is still lacking.
I’m not a developer, could somebody please create a plugin to support shellcheck?
DSpellCheck doesn’t fit the bill?
PeterJones last edited by
Clarification please: I interpreted your question as a question about “spell check” (and based on the contents of the previous reply, I’m not the only one).
But on re-reading, with the mention of “bash scripting”: is “
shellcheck” some sort of utility for helping with authoring of shell scripts, like bash scripts – and you’d like a plugin that integrated the
shellcheckresults into Notepad++? Or was it, as I originally thought, just a misspelling of “spellcheck”?
Alan Kilborn last edited by
Probably “shellcheck” is correct, as there’s one for vim: https://github.com/koalaman/shellcheck
PeterJones last edited by PeterJones
Probably “shellcheck” is correct, as there’s one for vim
Interesting. I learned recently that you can teach NppExec to interpret the output of an external command, like linters or other code checkers, and make it interact with Notepad++.
Since Michael seemed familiar with that feature, if @Gerhardus-Scheltema can supply example output of the
shellcheck, it might be possible to use it in conjunction with NppExec to do enough of what the OP wants, without a dedicated plugin. If it’s not a separate executable, but was built into that vim plugin/extension, it will be less likely to make it work easily.
(That said, the straight answer to the OP is "no, I don’t know of any
shellcheckplugin for Notepad++, and it doesn’t seem to be in the Plugins Admin list.)
LOL, sorry, I completely misread that post.
Looking into NppExec now, I already have the windows binary in my path. Shellcheck already returns json that indicates the position of the problem, having that directly in your edit window would be fantastic.
Fantastic, this is already much better, I have done this:
- Install NppExec plugin
- Plugins -> NppExec -> Run (F6)
- use this command: “shellcheck.exe -f gcc $(FULL_CURRENT_PATH)” # Note that shellcheck binary already in path
or just use “shellcheck.exe $(FULL_CURRENT_PATH)” also works
- Shift-F6 and add “%FILE%:%LINE%:%CHAR%” make it highlight red.
I open my files directly from WinScp the only problem is that you have to save the file, I’m usually very careful with my scripts anyway and work directly on test server, but it would be great if I can get it to save to temporary file run the linting show output and then I can make changes and save the file separately.
Are you editing a file on a remote server by WinScp locally, changes and the re-upload? Look at NppFTP, it does
scpas well. I use it all the time to edit files that are local to Linux from my Windows / N++.
NppFTP is a very good tool, but still does not support scp properly, and using public/private key authentication is still a struggle, or at least I cant get it to work. I use it at home for certain servers, but at work I prefer WinSCP and NPP when not using vim.
I hope this thread will inspire some plugin developer to integrate shellcheck into a plugin, have some kind of line highlighting or popup/tooltip type popup showing the output of shellcheck validation, maybe even a autoreplace text, which needs to be used with care :-)