-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
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
Add compliant and noncompliant examples of python/[email protected] #80
base: main
Are you sure you want to change the base?
Add compliant and noncompliant examples of python/[email protected] #80
Conversation
} | ||
], | ||
"source": [ | ||
"# Compliant: even though there are 2 different types assigned to variable `z`, it is only used within the same cells.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though there are 2 different types assigned to variable z
in two different cells, it is only used within one of the two cells.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DetectorLibrary only supports .py
files.
], | ||
"source": [ | ||
"# Noncompliant: variable `z` is assigned to 2 different types of values in above cells 3 and 4. \n", | ||
"# Then in cell 5, the value of `z` is used in a `print()` call.\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then in cell 5, the value of z
is used in a print()
call, which can have different result depending on the execution order of cells. \n"
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# {fact [email protected] defects=1} | ||
# —— Code Cell 1, Execution Count 1 —— # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this example, remove all Execution Count, as this information is not needed
Write this.
# —— Code Cell 1—— #
Description of changes: