You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The simple syntax error ("is") in elseif is Sys.iswindows(platform) was not caught by report_file using JET v0.8.20 on Julia v1.9.3:
functionis_supported(platform)
if Sys.islinux(platform)
returnarch(platform) in ["x86_64", "aarch64", "powerpc64le"]
elseif is Sys.iswindows(platform)
returnfalseelsereturnfalseendend
Is this expected?
The text was updated successfully, but these errors were encountered:
... but shouldn't the is symbol then be reported as not being defined...?
... a "few" minutes later... :-)
To answer my own question: JET.report_file reports concrete errors - a function definition (even with syntax errors) is not checked in that regard: This reports no errors:
functionis_true(foo)
if foo
returntrueelseif is foo
returnfalseendend
Whereas, this reports "is is not defined" (due to the concrete is_true(false) call):
functionis_true(foo)
if foo
returntrueelseif is foo
returnfalseendendis_true(false)
On the contrary, if the function definition had been in a package, JET.report_package (and StaticLint) would report the error (and so would JET.report_file(...; analyze_from_definitions = true)).
stemann
changed the title
Simple syntax error not reported if inside conditional
Simple syntax error not reported by report_file
Dec 20, 2023
The simple syntax error ("
is
") inelseif is Sys.iswindows(platform)
was not caught byreport_file
using JET v0.8.20 on Julia v1.9.3:Is this expected?
The text was updated successfully, but these errors were encountered: