We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Julia Insider v1.6.26 Julia v1.7.2
@eval makes the linter fail to detect which variable is used.
@eval
For example, copying the following code in vscode:
struct Job x::Int y::Int end @eval function Base.display(job::Job) fs = $(fieldnames(Job)) fs_string = $(map(string, fieldnames(Job))) max_byte = $(maximum(length, map(string, fieldnames(Job)))) println("Job:") for (i,f) in enumerate(fs) print(" ", f, " " ^ (max_byte - length(fs_string[i])), " → ") display(getfield(job, f)) end end
In vscode, linter hints fs, fs_string, max_bype variables have been assigned but not used. Julia(UnusedBinding).
fs
fs_string
max_bype
If we remove @eval, linter can detect those variables are used. (But it does not hint ERROR: syntax: "$" expression outside quote)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@eval
makes the linter fail to detect which variable is used.For example, copying the following code in vscode:
In vscode, linter hints
fs
,fs_string
,max_bype
variables have been assigned but not used. Julia(UnusedBinding).If we remove
@eval
, linter can detect those variables are used. (But it does not hint ERROR: syntax: "$" expression outside quote)The text was updated successfully, but these errors were encountered: