Closed reZach closed 3 years ago
Hello @reZach and thanks for contributing,
Global Checks can't be disabled using code annotations, since they work on the first pass of Atomic Checks (i.e. making decisions over these).
The LIMIT_NAVIGATION_GLOBAL_CHECK
checks if any LIMIT_NAVIGATION_JS_CHECK
was found. If it's there, the corresponding global finding is not issued, but if it's missing it does.
contents.on("new-window", (contentsEvent, navigationUrl) => { /* eng-disable LIMIT_NAVIGATION_JS_CHECK */
On the other hand, the LIMIT_NAVIGATION_JS_CHECK
will still be left to remind you to manually review the on
callback for bypasses. If you are confident it's safe, you can use the -l
flag to disable Global and Atomic Checks selectively (-l LimitNavigationGlobalCheck
).
I'll take care of clarifying this in the docs.
Hello @reZach and thanks for contributing,
Global Checks can't be disabled using code annotations, since they work on the first pass of Atomic Checks (i.e. making decisions over these).
The
LIMIT_NAVIGATION_GLOBAL_CHECK
checks if anyLIMIT_NAVIGATION_JS_CHECK
was found. If it's there, the corresponding global finding is not issued, but if it's missing it does.contents.on("new-window", (contentsEvent, navigationUrl) => { /* eng-disable LIMIT_NAVIGATION_JS_CHECK */
On the other hand, the
LIMIT_NAVIGATION_JS_CHECK
will still be left to remind you to manually review theon
callback for bypasses. If you are confident it's safe, you can use the-l
flag to disable Global and Atomic Checks selectively (-l LimitNavigationGlobalCheck
).I'll take care of clarifying this in the docs.
Thank you, I am able to run the command like so to ignore the check.
npx electronegativity -i ./ -x LimitNavigationGlobalCheck
Describe the bug All of my new-window and will-navigate events are secure and do not need to be notified as errors in the report that's generated by electronegativity. How do I disable LIMIT_NAVIGATION_GLOBAL_CHECK from spitting out an error? I tried
/* eng-disable LIMIT_NAVIGATION_GLOBAL_CHECK */
at the top of my file, but the error still persists.To Reproduce This sample main.js file can suffice to explain my attempts at disabling .
Expected behavior I expect the LIMIT_NAVIGATION_GLOBAL_CHECK error not to be logged in the report.
Stacktraces
Platform (please complete the following information):
Additional context I don't like putting the comment on the first line, I'd like to have the freedom to put it anywhere in my file.