4

im looking for a shell command-line tool to lint julia scripts (a static analyzer), eg.

local:~ $ linter(myjuliascript.jl)

which will produce its output to terminal => text with linter results = either

// messages inlined with text of myjuliascript.jl or
...
...
// messages indicating line numbers of myjuliascript.jl
...
...

i found this, https://github.com/tonyhffong/Lint.jl, but it does not look promising (does not compile).

question: do you know of any good-quality command-line tool with which to lint julia scripts?

id rather avoid plugins to IDE's, since im a little tired of IDEs; often they are too much kung-fu-fighting with too little benefit. eg. tried to get the VS code julia linter working, no luck; VS code, julia linter doesn't work (on mac)

mrchance
  • 1,133
  • 8
  • 24
  • 1
    *question: do you know of any good-quality command-line tool with which to lint julia scripts?* -- see #4 in the "some questions are still off-topic" list at https://stackoverflow.com/help/on-topic – Charles Duffy Sep 21 '20 at 18:50
  • 1
    ...that said, if you look at the issue history, the only open PR is a fix to the CI system, so if you're operating on whether the CI system says it's failed rather than having actually tried to build it yourself... might be worthwhile. – Charles Duffy Sep 21 '20 at 18:53
  • @CharlesDuffy please elaborate on your critique. in said link it says: ... if your question generally covers… 3) software tools commonly used by programmers ... or 4) a practical, answerable problem that is unique to software development ... …then you’re in the right place to ask your question! – mrchance Sep 21 '20 at 18:57
  • 1
    yes, but that's _subject to_ the exclusions in the other list below. "still off-topic" == "off-topic even if prior verbiage might imply otherwise". – Charles Duffy Sep 21 '20 at 19:03
  • 1
    Granted, the historical reasons aren't very applicable anymore -- back in the early days of the site we had a plague of people selling commercial libraries asking questions for which the product they made and were selling was the answer, often under sockpuppet accounts -- but then, having that strictly-enforced rule is probably _why_ we no longer have that problem. – Charles Duffy Sep 21 '20 at 19:04
  • 1
    ...obviously, asking a question for which a (commercially-licensed) software library is the answer still falls into your "software tools commonly used by programmers" and "practical, answerable problem that is unique to software development", so if the rule that "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow" didn't supersede, it would be completely useless at solving the problem it was implemented to address. – Charles Duffy Sep 21 '20 at 19:07
  • @CharlesDuffy which ought not to apply since this is about a very specific tool, its not "tell me the best editor", its about a specific language that needs a specific tool due to: being jit compiled and being a young language where existing tooling in IDEs (sometimes) fail. so not encouraging this kind of question will no help a language like julia. please tell me where i am mistaking in my reasoning and/or wrt said link. – mrchance Sep 21 '20 at 19:08
  • 1
    If you want to argue interpretation of the rules, the right place is [meta]. Mind, asking about a specific bug in `Lint.jl` would probably be on-topic here, if you were trying to fix it yourself and hit an issue you couldn't solve; it's the request for a recommendation (and you _are_ very explicitly asking for a recommendation) that's a problem. – Charles Duffy Sep 21 '20 at 19:10
  • 1
    "Please tell me the best editor" would be off-topic for _different_ reasons -- opinion-based, too-broad -- _in addition to_ the recommendation-requests exclusion. This one is _only_ falling into the recommendation-requests exclusion, but it's still there nonetheless. That said: If you open a discussion on [meta] and it reaches a conflicting consensus, I'll gladly retract my close vote and comments. – Charles Duffy Sep 21 '20 at 19:12

1 Answers1

2

The closest thing currently available appears to be https://github.com/julia-vscode/StaticLint.jl. While you could technically call this from the command line if so desired using, julia -e, the interface would not seem to be very conducive to that sort of usage.

cbk
  • 4,225
  • 6
  • 27