Skip to content
Closed

... #131

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/jobs/jobs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ function Base.show(io::IO, ::MIME"text/plain", job::Job)
print(io, '\n', " - ", file.filename, " (", file.type, "; ", file.size, " bytes)")
end
end
if job.env == nothing
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semgrep identified an issue in your code:
comparisons of nothing should be made with === or !=== or with isnothing()

To resolve this comment:

✨ Commit Assistant fix suggestion

Suggested change
if job.env == nothing
if isnothing(job.env)
View step-by-step instructions
  1. Replace job.env == nothing with isnothing(job.env) to properly check if job.env is nothing.
  2. Alternatively, if you want to check for non-nothing values, use !isnothing(job.env).

In Julia, isnothing() is the recommended approach for testing if a variable is nothing, to avoid unexpected results with type checks.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by compare-nothing.

You can view more details about this finding in the Semgrep AppSec Platform.

print(io, "...")
end
break
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semgrep identified an issue in your code:
The break and continue keywords should only be used inside a loop. Using them outside a loop scope results in a runtime error.

To resolve this comment:

✨ Commit Assistant fix suggestion

Suggested change
break
# break statement removed - it is invalid outside of a loop
View step-by-step instructions
  1. Remove the break statement from the code, since it is not inside any loop and will cause a runtime error.

Alternatively, if you intended to exit from a loop, make sure the break statement is placed inside a for or while loop. For example:

for x in xs ... if condition break end end

A break statement outside a loop is a syntax or runtime error in Julia and should be avoided.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by break-or-continue-outside-loop.

You can view more details about this finding in the Semgrep AppSec Platform.

if !isempty(job.env)
print(io, '\n', " inputs: ")
for (k, v) in job.env
Expand Down
Loading