niccord / BracketsCheck

notepad++ plugin for brackets balancing check
The Unlicense
20 stars 3 forks source link

False positives #14

Closed bege10 closed 2 years ago

bege10 commented 2 years ago

BracketsCheck v 1.2.2 64-bit marks opening and closing brackets with no contents as faulty. That leads to false positives as in this case in Javascript function().

niccord commented 2 years ago

Hi, thanks for the interest in my plugin.

I am not able to reproduce the bug you submit; can you please provide (a part of) your file causing the issue?

Cheers!

bege10 commented 2 years ago

Thank you for your answer. I saw that I was mislead by the character number.

With this script I get an error notice ExtensionOptionsMenu+.uc.js.zip

Screenshot_283 At position 19 there are the round brackets.

If I remove these brackets I get this the error message Screenshot_284

So I guess that the first message already meant the curly bracket.

I understand neither the character number in the error message nor why the bracket is marked as incomplete. The script works fine and NPP shows the closing bracket.

niccord commented 2 years ago

Hi, can you please provide the file you are checking and the list of the installed plugins you have on your system? It could be a compatibility issue.

Cheers.

bege10 commented 2 years ago

The file is attached as zip archive at the beginning of my previous post.

Notepad++ v8.1.5 (64-bit) Build time : Sep 26 2021 - 15:23:23 Path : C:\Program Files\Notepad++\notepad++.exe Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 10 Pro (64-bit) OS Version : 2009 OS Build : 19043.1288 Current ANSI codepage : 1252 Plugins : AutoCodepage.dll BetterMultiSelection.dll BracketsCheck.dll CodeAlignmentNpp.dll ColumnTools.dll ComparePlugin.dll DSpellCheck.dll Explorer.dll HTMLTag.dll ImgTag.dll LanguageHelp.dll Linefilter3.dll MenuIcons.dll mimeTools.dll NavigateTo.dll nppAutoDetectIndent.dll NppConverter.dll NppExport.dll NppFTP.dll NPPJSONViewer.dll NppMenuSearch.dll NppTextViz.dll NppToolBucket.dll NppXmlTreeviewPlugin.dll RunMe.dll SelectQuotedText.dll SessionMgr.dll SurroundSelection.dll XBrackets.dll XMLTools.dll _CustomizeToolbar.dll

niccord commented 2 years ago

Hi, sorry for the late reply.

Thanks for sharing your file. From what I understood, the plugin displays a wrong error message since the unbalanced bracket is not in the position it points out.

Besides that, you have what the plugin consider an angle closing bracket at line 109 and on some other lines going forward: .addon-disabled > .menu-iconic-left { filter: grayscale(1); }

If you disable the angle brackets check in the plugin menu, it now confirms your file is balanced.

bege10 commented 2 years ago

Thank you. I noticed that as long as angle brackets is checked also curly brackets are not processed correct. But when angle brackets is unchecked the plugin works. Thanks again.