Author Topic: shellcheck linter for bash scripts  (Read 899 times)

pbrightly

  • Community Member
  • Posts: 68
  • Hero Points: 6
shellcheck linter for bash scripts
« on: May 10, 2021, 04:12:50 PM »
Does slick support live errors for shell scripts on other platforms than Windows?  It's pretty much free and easy.  I was able to create a build command for it using the copy installed on my wsl ubuntu.  I'm pretty sure it could be installed on the windows side, but haven't bothered with that since I'm toying with using wsl with my build commands.
Using the -f gcc option, it puts the proper format in the build window and Next-Error works!!

pbrightly

  • Community Member
  • Posts: 68
  • Hero Points: 6
Re: shellcheck linter for bash scripts
« Reply #1 on: May 10, 2021, 05:16:18 PM »
PS. Also works when I converted to macro and ran with wsl build window. But.. thinks every command prompt is an error, so I have to hit ESC to ignore those and move on to actual error lines.  I started debugging next-error to see if I could write my own macro... but that looks too time consuming.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: shellcheck linter for bash scripts
« Reply #2 on: May 10, 2021, 05:42:34 PM »
It would be good to add that as a default live errors profile, that can use shellcheck if it's installed.  I'll put that on my list.

"next-error" is driven from the error configuration in Options -> Tools -> Configure Error Parsing.  For your case, where it's detecting your command line as an error, that's from an overly accepting regex that we shipped with.  To disable the problem regex,  bring up the options dialog, and go to Tools -> Configure Error Parsing, and click on the "Java" expression category, and uncheck the "NJikes" error.

I've got an entry in my notes to disable that one in the default config anyway - Jikes is about as dead as you can get, and I've had other innocuous text get picked up as errors by that one RE.


pbrightly

  • Community Member
  • Posts: 68
  • Hero Points: 6
Re: shellcheck linter for bash scripts
« Reply #3 on: May 10, 2021, 05:53:22 PM »
Sweet. Easy fix in config. Thanks.