Skip to content

Commit ecd2c3a

Browse files
committed
Add a source filter when using the '--no-subprojects' flag
Ensure that sources forwarded to the GNATcheck worker are only Ada.
1 parent c69cd14 commit ecd2c3a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lkql_checker/src/gnatcheck-projects.adb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ package body Gnatcheck.Projects is
220220
------------------------------
221221

222222
procedure Get_Sources_From_Project (My_Project : in out Arg_Project_Type) is
223+
use type GPR2.Language_Id;
223224

224225
function Only_Ada_Mains
225226
(Prj : GPR2.Project.View.Object) return Boolean;
@@ -234,7 +235,6 @@ package body Gnatcheck.Projects is
234235
function Only_Ada_Mains
235236
(Prj : GPR2.Project.View.Object) return Boolean
236237
is
237-
use type GPR2.Language_Id;
238238
Src : GPR2.Build.Source.Object;
239239
CU : GPR2.Build.Compilation_Unit.Unit_Location;
240240

@@ -333,7 +333,10 @@ package body Gnatcheck.Projects is
333333
end if;
334334
else
335335
for Src of Root.Sources loop
336-
Store_Sources_To_Process (String (Src.Path_Name.Simple_Name));
336+
if Src.Language = GPR2.Ada_Language then
337+
Store_Sources_To_Process
338+
(String (Src.Path_Name.Simple_Name));
339+
end if;
337340
end loop;
338341
end if;
339342
end if;

0 commit comments

Comments
 (0)