From bb9663c48b712e9c821ba9065d2fb7d7528fdc4a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 9 Jan 2004 14:21:15 +0000 Subject: always print "can't find package" warning, even with restrict-to-files --- perl_checker.src/perl_checker.ml | 2 +- perl_checker.src/tree.ml | 1 + perl_checker.src/tree.mli | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/perl_checker.src/perl_checker.ml b/perl_checker.src/perl_checker.ml index a71b062..8e9bbd9 100644 --- a/perl_checker.src/perl_checker.ml +++ b/perl_checker.src/perl_checker.ml @@ -67,7 +67,7 @@ and parse_package_if_needed per_files (package_name, pos) = | Some required_packages -> required_packages, per_files | None -> parse_file (dir = !basedir) (Some package_name) per_files file with Not_found -> - warn_with_pos pos (Printf.sprintf "can't find package %s" package_name) ; + warn_with_pos_always pos (Printf.sprintf "can't find package %s" package_name) ; [], per_files let rec parse_required_packages state already_done = function diff --git a/perl_checker.src/tree.ml b/perl_checker.src/tree.ml index 002548f..335934b 100644 --- a/perl_checker.src/tree.ml +++ b/perl_checker.src/tree.ml @@ -50,6 +50,7 @@ let ignore_package pkg = let die_with_pos pos msg = failwith (Info.pos2sfull pos ^ msg) let warn_with_pos pos msg = print_endline_flush (Info.pos2sfull pos ^ msg) +let warn_with_pos_always pos msg = print_endline_flush_always (Info.pos2sfull pos ^ msg) let s2context s = match s.[0] with diff --git a/perl_checker.src/tree.mli b/perl_checker.src/tree.mli index fb449d5..9363a5e 100644 --- a/perl_checker.src/tree.mli +++ b/perl_checker.src/tree.mli @@ -50,6 +50,7 @@ val get_vars_declaration : (context * string * string, pos * prototype option) H val die_with_pos : string * int * int -> string -> 'a val warn_with_pos : string * int * int -> string -> unit +val warn_with_pos_always : string * int * int -> string -> unit val fold_tree : ('a -> fromparser -> 'a option) -> 'a -> fromparser -> 'a val from_qw : fromparser -> (context * string) list -- cgit v1.2.1