Opened on Aug 4, 2020 at 4:34:34 PM
Closed on Aug 5, 2020 at 8:30:51 PM
Last modified on Aug 12, 2020 at 8:13:12 PM
#3777 closed Bug (No Bug)
Au3Check Custom Includes
| Reported by: | seadoggie01 | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | Au3Check | |
| Version: | 3.3.14.5 | Severity: | None |
| Keywords: | Au3Check | Cc: |
Description
Au3Check cares about what symbol is used in custom includes to #include files.
; Main.au3 #include <Test.au3> #include <Test2.au3>
; Test.au3 #include "Test2.au3"
; Test2.au3 Global $__g_bGarbage
Attachments (0)
Change History (6)
comment:2 by , on Aug 4, 2020 at 7:27:03 PM
| Component: | AutoIt → Au3Check |
|---|---|
| Reporter: | changed from to |
comment:3 by , on Aug 5, 2020 at 1:06:43 PM
I donn't understand as the warning are clear to me
>Running AU3Check (3.3.15.3) params:-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 from:C:\Program Files (x86)\AutoIt3\Beta input:F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Main.au3 "F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Main.au3"(3,10) : warning: already included file: F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Test2.au3 #include <Test2.au3> ~~~~~~~~~^ "F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Test2.au3"(2,21) : warning: $__g_bGarbage already declared/assigned Global $__g_bGarbage ~~~~~~~~~~~~~~~~~~~~^ F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Main.au3 - 0 error(s), 2 warning(s) ->14:05:38 AU3Check ended. Press F4 to jump to next error.rc:1
follow-up: 6 comment:4 by , on Aug 5, 2020 at 2:56:54 PM
The warnings are clear, but the file should only be included once (and is if it's compiled). A better example would've been to use a function in Test2.au3. If you run Au3Check it says the function will be double-declared. If you skip Au3Check, AutoIt doesn't report an error on a double-declared function.
comment:5 by , on Aug 5, 2020 at 8:30:51 PM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Why once as you don't have that specified?
Lets have this discussion on the forum first with some proper examples before declaring it a bug.
So closing the discussion here for the moment.
Jos
comment:6 by , on Aug 12, 2020 at 8:13:12 PM
Replying to seadoggie01:
The warnings are clear, but the file should only be included once (and is if it's compiled).
did you try to use:
#include-once

This only seems to matter in custom includes and it only matters if different symbols are used to wrap the file name. (I posted this bug but missed putting my username in)