Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utils.Drivers: fix Counter decrement for ignored files #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions src/utils-drivers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,25 @@ package body Utils.Drivers is

Global_Report_Dir : String_Ref;

procedure Include_One (File_Name : String);
-- Include File_Name in the Ignored set below

Ignored : String_Set;
-- Set of file names mentioned in the --ignore=... switch

procedure Include_One (File_Name : String) is
begin
Include (Ignored, File_Name);
end Include_One;

procedure Process_Files is
N_File_Names : constant Natural :=
Num_File_Names (Cmd) - Arg_Length (Cmd, Ignore);
Num_File_Names (Cmd);

Counter : Natural := N_File_Names;
Has_Syntax_Err : Boolean := False;

procedure Include_One (File_Name : String);
-- Include File_Name in the Ignored set above

procedure Include_One (File_Name : String) is
begin
Include (Ignored, File_Name);
Counter := Counter - 1;
end Include_One;

use Directories;
begin
-- First compute the Ignored set by looking at all the --ignored
Expand Down