False positive rpg:S1902 on data structures

False positive rpg:S1902
SonarQube Server 2026.1
RPG
Subprocedures should not reference global variables - S1902

This raises a warning when the element within a global data structure is used to define like definitions. You should not need to pass an entire data structure to define what a variable is like. This is not raised on similar global variables if they are defined like.

**free
dcl-ds element;
  id varchar(36); // Global variable defined here
end-ds;
dcl-s filename varchar(25); // Other global variable defined here
dcl-proc test_proc;
  dcl-pi *n;
    el_id like(element.id) const; // Incorrectly raises warning
    file_name like(filename) const; // Does not raise warning, as expected
  end-pi;
end-proc;