Skip to content

...#131

Draft
mortenpi wants to merge 1 commit intomainfrom
mp/fix-job
Draft

...#131
mortenpi wants to merge 1 commit intomainfrom
mp/fix-job

Conversation

@mortenpi
Copy link
Member

No description provided.

print(io, '\n', " - ", file.filename, " (", file.type, "; ", file.size, " bytes)")
end
end
if job.env == nothing

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.

if job.env == nothing
print(io, "...")
end
break

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.

@semgrep-juliahub-integration
Copy link

Semgrep found 1 no-implicit-return finding:

Block-form functions should explicity return a value. If no meaningful
value is returned, explicity write return nothing instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant