File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -220,9 +220,12 @@ package body Gnatcheck.Projects is
220
220
-- ----------------------------
221
221
222
222
procedure Get_Sources_From_Project (My_Project : in out Arg_Project_Type) is
223
+ use type GPR2.Language_Id;
223
224
224
225
function Only_Ada_Mains
225
226
(Prj : GPR2.Project.View.Object) return Boolean;
227
+ -- Returns whether the provided ``Prj`` project view defines only Ada
228
+ -- mains.
226
229
227
230
procedure Store_Source (Unit : GPR2.Build.Compilation_Unit.Object);
228
231
-- Callback used to store sources
@@ -234,7 +237,6 @@ package body Gnatcheck.Projects is
234
237
function Only_Ada_Mains
235
238
(Prj : GPR2.Project.View.Object) return Boolean
236
239
is
237
- use type GPR2.Language_Id;
238
240
Src : GPR2.Build.Source.Object;
239
241
CU : GPR2.Build.Compilation_Unit.Unit_Location;
240
242
@@ -333,7 +335,10 @@ package body Gnatcheck.Projects is
333
335
end if ;
334
336
else
335
337
for Src of Root.Sources loop
336
- Store_Sources_To_Process (String (Src.Path_Name.Simple_Name));
338
+ if Src.Language = GPR2.Ada_Language then
339
+ Store_Sources_To_Process
340
+ (String (Src.Path_Name.Simple_Name));
341
+ end if ;
337
342
end loop ;
338
343
end if ;
339
344
end if ;
You can’t perform that action at this time.
0 commit comments