-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
[Suggestion:] 某库文件
被任意文件n
引用后,不存在的变量n
的警告消失
#644
Comments
Translate: When "some library file" is referenced by "any file n", the warning of non-existent "variable n" disappears. A "library file" can be referenced by countless files. Theoretically, as long as "Library.ahk" is referenced enough times, all warnings about non-existent variable names in this "Library.ahk" file will completely disappear. As a result, any incorrectly written variable names in "Library.ahk" no longer show warnings. This is because there are enough files referencing this "library" that define global variables with exactly the same names. Therefore, it is hoped that: all undefined variable warnings should display normally in the current file. The warnings in "File A" should not disappear because it was referenced by others; warnings should only disappear because "File A" referenced others. |
Totally agree. The fact that the error is repeated many times doesn't mean it is right. |
In this case, more #includes are needed to suppress warnings. Warning errors like #643 will also be eliminated. What about features such as parameter prompting and completion? Is that the same? |
I think thats a different thing. Autohotkey will execute lines in Parameter prompting and completion are unrelated to the order in which the files are read I guess. I think the issue here is this, the parser should start on the root folder and go in the same order as the script is loading the files and marking warning/errors in that same order. At least it should try and mimic what the autohotkey parser is doing and mark the errors in that same order. |
Executing this file first does not mean that these unassigned variables are accessed first. It is also unreliable to mark warnings in order.
This only affects where the warning appears, not whether the warning appears. When ahk is loaded, you will not get different warnings in different order. |
Sorry then my comments are not helpful, I thought he said:
I took that to meant that they were gone completely. Are you saying the warning is still present but on a different spot? |
Under normal circumstances, the warning of the extension tag should be consistent with ahk, because the recognition order of the extension and the loading order of ahk may be different, resulting in different tag positions. |
After realizing module parsing, using module grammar can solve this issue. |
You don't mistake. What I am speaking of, is surely whether to show warnings. I had initially expected it to show warnings, but nothing at all if the file has been included by another file. |
另外建议: |
某库文件
被任意文件n
引用后,不存在的变量n
的警告消失。一个
库文件
是可以被无数文件引用的。 理论上,只要Library.ahk
被引用的次数足够多,那么这个Library.ahk
文件中,所有不存在的变量名的警告都将全部消失。 这样一来,任何变量名在Library.ahk
中写错了,都不再显示警告。因为有足够多的引用这个“库”的文件,定义了正好重名的全局变量。显然,这不符合本意。
所以希望:所有变量未定义的警告都在当前文件中正常显示。
文件A
的警告不该因为 “被谁引用了” 而消失;警告只会因为文件A
“引用了谁” 而消失。The text was updated successfully, but these errors were encountered: