X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lib%2FPerl%2FTidy%2FLogger.pm;h=910ee49048f8b33d16835465be8aef758dc899b6;hb=880633cc084e9d787eb9f760d3851c5d660db17c;hp=14927e8ed57cd628adb9c4c1e092254686c77cbd;hpb=57d829ae0e2c75828f8ecc9c7139579350927dbc;p=perltidy.git diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 14927e8..910ee49 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20210717'; +our $VERSION = '20220217'; sub AUTOLOAD { @@ -435,113 +435,32 @@ sub warning { return; } -# programming bug codes: -# -1 = no bug -# 0 = maybe, not sure. -# 1 = definitely -sub report_possible_bug { - my $self = shift; - my $saw_code_bug = $self->{_saw_code_bug}; - $self->{_saw_code_bug} = ( $saw_code_bug < 0 ) ? 0 : $saw_code_bug; - return; -} - sub report_definite_bug { my $self = shift; $self->{_saw_code_bug} = 1; return; } -sub ask_user_for_bug_report { - - my ( $self, $infile_syntax_ok, $formatter ) = @_; - my $saw_code_bug = $self->{_saw_code_bug}; - if ( ( $saw_code_bug == 0 ) && ( $infile_syntax_ok == 1 ) ) { - $self->warning(<{_saw_extrude} ) { - $self->warning(<warning(<get_added_semicolon_count(); - }; - if ( $added_semicolon_count > 0 ) { - $self->warning(<{_saw_code_bug}; my $rOpts = $self->{_rOpts}; - return - $saw_code_bug == 1 - || $rOpts->{'logfile'} - || $rOpts->{'check-syntax'}; + return $saw_code_bug == 1 || $rOpts->{'logfile'}; } sub finish { # called after all formatting to summarize errors - my ( $self, $infile_syntax_ok, $formatter ) = @_; + my ( $self, $formatter ) = @_; my $rOpts = $self->{_rOpts}; my $warning_count = $self->{_warning_count}; my $saw_code_bug = $self->{_saw_code_bug}; - my $save_logfile = - ( $saw_code_bug == 0 && $infile_syntax_ok == 1 ) - || $saw_code_bug == 1 + my $save_logfile = $saw_code_bug == 1 || $rOpts->{'logfile'}; my $log_file = $self->{_log_file}; if ($warning_count) { @@ -564,7 +483,6 @@ sub finish { $self->warning("To save a full .LOG file rerun with -g\n"); } } - $self->ask_user_for_bug_report( $infile_syntax_ok, $formatter ); if ($save_logfile) { my $log_file = $self->{_log_file};