-
Notifications
You must be signed in to change notification settings - Fork 0
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
Prevent multiple messages for one violation #23
Conversation
…shasvi/fix-no-internal
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.
Looks better.
In general, the tests are a bit confusing due to the @bentley/@iTwin scope option/requirement. Could you add a comment next to the import(s) clarifying why the code is valid or invalid? Something like "not a bentley/itwin scope" or "is a local import"
Yes, will add that |
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.
lgtm, minor comments mostly formatting nits which can be resolved at your leisure
Great idea, does make them much more readable. |
Fixes #22. The problem is that the no-internal rule was generating duplicate error messages. This was because the rule was not correctly handling the traversal of declarations and their parents, leading to redundant checks and violation messages. Fixed the function calls and added a
visitedDeclarations
set to avoid duplicate processing of declarations.