66-- This package defines options that are supposed to be of a common interest
77-- for all the tools.
88
9- with Ada.Command_Line ; use Ada.Command_Line;
10- with Ada.Directories ; use Ada.Directories;
119with Ada.Environment_Variables ;
1210with Ada.Strings.Unbounded ; use Ada.Strings.Unbounded;
1311
@@ -33,9 +31,6 @@ package Lkql_Checker.Options is
3331 Version_String : constant String :=
3432 Lkql_Checker_Version & " (" & Date & " )" ;
3533
36- Executable : constant String := Base_Name (Command_Name);
37- -- Name of the current executable (e.g. "gnatcheck" or "gnatkp")
38-
3934 Custom_Worker_Var : constant String := " GNATCHECK_WORKER" ;
4035 -- The name of the environment variable used to define a custom worker
4136 -- executable.
@@ -69,11 +64,6 @@ package Lkql_Checker.Options is
6964 -- tool (includes both wrong parameters and wrong combinations of correct
7065 -- parameters).
7166
72- Gnatkp_Mode : Boolean := Executable = " gnatkp" ;
73- -- Whether we are running in KP detection mode
74- -- Set either when the executable is called gnatkp or with the debug switch
75- -- '-dkp'
76-
7767 Legacy : Boolean := False;
7868 -- If True, run in legacy mode, with no support for additional rule files.
7969
@@ -679,7 +669,7 @@ package Lkql_Checker.Options is
679669 function XML_Report_File_Path return String;
680670
681671 function Ignore_Project_Switches return Boolean
682- is (Ignore_Project_Switches_Opt.Get or Gnatkp_Mode);
672+ is (Ignore_Project_Switches_Opt.Get or Mode = Gnatkp_Mode);
683673
684674 function Source_Files_Specified return Boolean
685675 is (Source_Files.Get /= Null_Unbounded_String);
@@ -706,10 +696,12 @@ package Lkql_Checker.Options is
706696 -- the specified ``Default_Name``.
707697
708698 function Text_Report_File_Path return String
709- is (Resolve_Report_File (Text_Output.Get, Executable & " .out" ));
699+ is (Resolve_Report_File
700+ (Text_Output.Get, Lkql_Checker_Mode_Image & " .out" ));
710701
711702 function XML_Report_File_Path return String
712- is (Resolve_Report_File (XML_Output.Get, Executable & " .xml" ));
703+ is (Resolve_Report_File
704+ (XML_Output.Get, Lkql_Checker_Mode_Image & " .xml" ));
713705 end Arg ;
714706
715707 -- ------------------------
0 commit comments