You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you use a copybook for your control statements and include the main() statement, a program using this copybook will have its correctly defined main procedure marked as "No reference to definition.".
To Reproduce
Let's say you want to use a standard name for the main procedure of your programs, e.g. "Main".
You define a copybook (e.g. "qcpylesrc/cpypgm_h.rpgle", which includes the following statement: ctl-opt main(Main);
You include the copybook in your program source and define the main procedure:
/copy 'qcpylesrc/cpypgm_h.rpgle'
dcl-proc Main;
Then the main procedure will be marked as "no reference to definition" by the linter.
If you replace the /copy in the program source with its contents, the same warning disappears.
Expected behavior
The linter should not be marking the procedure as "No reference to definition.", because the ctl-opt statement clearly takes use of it.
Screenshots
See example code given above
Environment:
Extension version v0.26.8
IBM i OS version 7.4
Additional context
None.
The text was updated successfully, but these errors were encountered:
I've been thinking about this and I'd consider this valid since the linter expects it to be in the main source and not a copybook. We likely need something else to allow this.
Describe the bug
If you use a copybook for your control statements and include the main() statement, a program using this copybook will have its correctly defined main procedure marked as "No reference to definition.".
To Reproduce
Let's say you want to use a standard name for the main procedure of your programs, e.g. "Main".
You define a copybook (e.g. "qcpylesrc/cpypgm_h.rpgle", which includes the following statement:
ctl-opt main(Main);
You include the copybook in your program source and define the main procedure:
Then the main procedure will be marked as "no reference to definition" by the linter.
If you replace the /copy in the program source with its contents, the same warning disappears.
Expected behavior
The linter should not be marking the procedure as "No reference to definition.", because the ctl-opt statement clearly takes use of it.
Screenshots
See example code given above
Environment:
Additional context
None.
The text was updated successfully, but these errors were encountered: