#!/usr/bin/perl

# PODNAME: test_whitespaces
# ABSTRACT: script to check files for errors in whitespaces


use strict;
use warnings;

use Test::Whitespaces { _only_load => 1 };

Test::Whitespaces::_run_script(
    script => 'test_whitespaces',
    dir => \&Test::Whitespaces::_check_dir,
    file => \&Test::Whitespaces::_check_file,
);

__END__

=pod

=head1 NAME

test_whitespaces - script to check files for errors in whitespaces

=head1 VERSION

version 1.1.0

=head1 SYNOPSIS

test_whitespaces [FILEs or DIRs or both]

 Options:

      --only_errors     Script will output only errors
      --help            Show this message
      --version         Show version number

Script will work on text files that are specified as the parameters or are
situated in the specified diretories.

Script will check if all the rules are followed.

=over

=item * Each line ends with "\n" (including the last line)

=item * For new lines "\n" is used (not "\r\n")

=item * There are no ending spaces on the lines

=item * 4 spaces are used instead of tabs

=item * No empty lines in the end of file

=back

In case of errors script outputs friendly information what is wrong.

There is also a script `L<whiter>` that can fix all that errors and there is a
Perl module L<Test::Whitespaces> that can be used to test your source code.

=encoding UTF-8

=head1 SOURCE CODE

The source code for this script is hosted on GitHub
L<https://github.com/bessarabov/Test-Whitespaces>

=head1 AUTHOR

Ivan Bessarabov <ivan@bessarabov.ru>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Ivan Bessarabov.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
