Skip to content
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] #61

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ankit-amazon
Copy link
Contributor

Description of changes:

@@ -0,0 +1,18 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

Choose a reason for hiding this comment

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

This rule detects three kinds of violations: empty cell, too many cel, as well as misplaced imports. You need to add them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Improved examples.

Comment on lines 4 to 5
def __CELL_EDGE__(x):
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the CELL_EDGE markers

@@ -0,0 +1,20 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need separate files for compliant and non compliant? Can these be in the same .py file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to cover all three types of violation(blank cell, cell limit, misplaced imports) in one file is not possible. Is it ok if we create separate files for each example?

Copy link
Contributor

@san2488 san2488 left a comment

Choose a reason for hiding this comment

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

I'm not sure this will pass through the Detector Library publish correctly due to being in 2 separate files and failing linter checks. Not approving this one yet.

Copy link
Contributor

@san2488 san2488 left a comment

Choose a reason for hiding this comment

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

Let's discuss what we want here. In the current state, we can't publish this since the library only supports .py files.

# SPDX-License-Identifier: Apache-2.0

# {fact [email protected] defects=1}
# —— Code Cell 1, Execution Count 1 —— #

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—— #

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved.

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.

3 participants