News for hackers. Stuff that matters.
Re:ShellCheck: A static analysis tool for shell scripts by ufo on Thursday March 18, 2021 @01:53PM (#26505465)
One of my favorite things about Shellcheck is that the error messages come with a link to a wiki page about the problem. Does anyone know other programs that have a similar approach to error messages?

https://github.com/koalaman/shellcheck/wiki/Checks

Re:ShellCheck: A static analysis tool for shell scripts by varbhat on Thursday March 18, 2021 @01:55PM (#26505491)
Re:ShellCheck: A static analysis tool for shell scripts by mitmaro on Thursday March 18, 2021 @02:00PM (#26505538)
Related, Clippy, a linter for Rust also does the same and links to https://rust-lang.github.io/rust-clippy/master/index.html .
Re:ShellCheck: A static analysis tool for shell scripts by KronisLV on Thursday March 18, 2021 @02:28PM (#26505846)
I recall working with AngularJS, which output error messages that had links, which opened the documentation with bits from your stack trace filled in.

It was a while ago and seemed a bit gimmicky, but i really enjoyed the ability to see what could be done about an error by opening a web page (without having to manually dig through StackOverflow or other sites).

Now, if we'd get a development framework that'd couple documentation like that, with user generated comments (like PHP has, for example see the bottom of https://www.php.net/manual/en/function.strcmp.php ), then i think the developer experience would improve a bunch!

Who knows, maybe even allow users to contribute possible fixes and allow those as autocomplete solutions and you've just improved on what tools like Codota do a whole bunch!

Re:ShellCheck: A static analysis tool for shell scripts by jidiculous on Saturday March 27, 2021 @09:46PM (#26607301)
Staticcheck for Go kind of does something similar in that it outputs Googleable error codes, but doesn't actually print a link to the pages. It's also included as part of golangci-lint.

https://staticcheck.io/docs/checks

Re:ShellCheck: A static analysis tool for shell scripts by thepratt on Thursday March 18, 2021 @03:40PM (#26506678)
Hadolint is another. It's built atop shellcheck.

https://github.com/hadolint/hadolint

Re:ShellCheck: A static analysis tool for shell scripts by DiabloD3 on Thursday March 18, 2021 @01:58PM (#26505513)
Yeah, C# compilers do. Easily Googleable error code to further explain it.
Re:ShellCheck: A static analysis tool for shell scripts by oblio on Thursday March 18, 2021 @02:46PM (#26506063)
I think it's a Microsoft thing. A ton of their stuff has unique error codes just for this purpose.
Re:ShellCheck: A static analysis tool for shell scripts by llarsson on Thursday March 18, 2021 @04:02PM (#26506954)
Sure beats the General Protection Fault we were so accustomed to back in the day. :)
Re:ShellCheck: A static analysis tool for shell scripts by MichaelMoser123 on Thursday March 18, 2021 @10:59PM (#26509814)
they had the MSDN cd (microsoft developer network) for documentation in these days; that cd had a lot of thorough documentation for apis and developer tools.
Re:ShellCheck: A static analysis tool for shell scripts by _pmf_ on Thursday March 18, 2021 @04:37PM (#26507284)
All heavily internationalized software should have error codes.
Re:ShellCheck: A static analysis tool for shell scripts by oblio on Friday March 19, 2021 @08:17AM (#26512391)
PHP was just ahead of the T_PAAMAYIM_NEKUDOTAYIM curve.
Re:ShellCheck: A static analysis tool for shell scripts by trinix912 on Thursday March 18, 2021 @02:49PM (#26506113)
Remember back when OS/2 had a special error code for every error message?
Re:ShellCheck: A static analysis tool for shell scripts by SSLy on Thursday March 18, 2021 @06:25PM (#26508175)
Codes like that are a part of IBM culture that spilled out to other companies.
Re:ShellCheck: A static analysis tool for shell scripts by ptman on Friday March 19, 2021 @04:30AM (#26511127)
If you're building a REST API, make sure to check out RFC7807 ( https://tools.ietf.org/html/rfc7807 ) , which recommends doing exactly this. Giving each error a type, which is a resolvable URI.
Re:ShellCheck: A static analysis tool for shell scripts by human_error on Thursday March 18, 2021 @08:33PM (#26509096)
SQLAlchemy also does something similar. It points to relevant SQLAlchemy page for more information about the error.
Re:ShellCheck: A static analysis tool for shell scripts by darwingr on Thursday March 18, 2021 @11:00PM (#26509820)
Dart's static analyzer & lint rules: https://dart-lang.github.io/linter/lints/

Each rule has its own url. Tool therefore easily gives you a link.

Re:ShellCheck: A static analysis tool for shell scripts by account42 on Monday March 22, 2021 @06:32AM (#26538913)
Newer versions of GCC have clickable (using terminal escape sequences) warning flags in the output that link to the corresponding documentation.
Re:ShellCheck: A static analysis tool for shell scripts by imoverclocked on Thursday March 18, 2021 @05:26PM (#26507737)
Errorprone (java compiler plug-in) has this as does NullAway (an errorprone plug-in)

I agree that it’s really handy, especially when implementing the check in a CI pipeline with lots of developers.

Re:ShellCheck: A static analysis tool for shell scripts by rakingleaves on Thursday March 18, 2021 @05:26PM (#26507735)
Re:ShellCheck: A static analysis tool for shell scripts by tyingq on Thursday March 18, 2021 @03:57PM (#26506874)
find-sec-bugs does that. It's used by, for example, SonarQube.

See https://github.com/find-sec-bugs/find-sec-bugs/blob/master/f...

Re:ShellCheck: A static analysis tool for shell scripts by monoideism on Thursday March 18, 2021 @06:39PM (#26508289)
Many of the JS linters do as well (eslint, etc).
Re:ShellCheck: A static analysis tool for shell scripts by agapon on Friday March 19, 2021 @05:28PM (#26518299)
zpool status