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

Why are sessionSymbols considered suspicious? #12

Closed
kenkangxgwe opened this issue Aug 29, 2021 · 2 comments
Closed

Why are sessionSymbols considered suspicious? #12

kenkangxgwe opened this issue Aug 29, 2021 · 2 comments

Comments

@kenkangxgwe
Copy link

I recently noticed that codeInspector gave warnings about Quit, Echo and other so-called SessionSymbols here. I wonder what those warnings are about? One thing that I can think of is that these symbols are often for debugging during development, so the warning is there to remind users that there are debug symbols and should not be included in the final package?

@bostick
Copy link

bostick commented Aug 30, 2021

Quit, Echo, etc. are considered suspicious in package code because they are generally not intended to be in package code, and their presence is a bug.

This can happen because they were left in during debugging

This can also happen because code is copied from a notebook, where it is more acceptable to use Quit, Echo, etc.

The presence of these symbols is not always a problem, which is why this rule has confidence of 0.55.

Right now, the rule is only looking at the presence of the symbol itself.

When more specific patterns are developed and the context of the symbols in the surrounding code is better understood, then there will be fewer false positives and I will increase the confidence in the rule.

@bostick bostick closed this as completed Aug 30, 2021
@szhorvat
Copy link

This is useful. I've left a stray Echo in there before.

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

No branches or pull requests

3 participants