houseabsolute / perl-code-tidyall

Engine for tidyall, your all-in-one code tidier and validator
https://metacpan.org/release/Code-TidyAll/
Other
21 stars 31 forks source link

0.83: test suite fails in `t/Plugin-PodSpell.t` #124

Open kloczek opened 1 year ago

kloczek commented 1 year ago

Perl 5.38.0 and test suite fails in t/Plugin-PodSpell.t

```console + cd Code-TidyAll-0.83 + /usr/bin/make -O -j48 V=1 VERBOSE=1 test PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # # Versions for all modules listed in static metadata (including optional ones): # # === Configure Requires === # # Module Want Have # ------------------- ---- ---- # ExtUtils::MakeMaker any 7.70 # # === Test Requires === # # Module Want Have # ------------------- ---- -------- # Encode any 3.19 # ExtUtils::MakeMaker any 7.70 # File::Spec any 3.88 # FindBin any 1.53 # Test::Class::Most any 0.08 # Test::Differences any 0.70 # Test::Fatal any 0.017 # Test::More 0.96 1.302195 # Test::Warnings any 0.031 # autodie any 2.36 # lib::relative any 1.002 # # === Test Recommends === # # Module Want Have # ---------- -------- ------- # CPAN::Meta 2.120900 missing # # === Runtime Requires === # # Module Want Have # --------------------------- -------- -------- # Capture::Tiny any 0.48 # Config::INI::Reader any 0.029 # Cwd any 3.89 # Data::Dumper any 2.188 # Date::Format any 2.24 # Digest::SHA any 6.04 # Exporter any 5.77 # File::Basename any 2.86 # File::Find any 1.43 # File::Spec any 3.88 # File::Which any 1.27 # File::pushd any 1.016 # Getopt::Long any 2.54 # IPC::Run3 any 0.048 # IPC::System::Simple any 1.30 # List::Compare any 0.55 # List::SomeUtils any 0.59 # Log::Any any 1.717 # Module::Runtime any 0.016 # Moo 2.000000 2.005005 # Moo::Role any 2.005005 # Path::Tiny 0.098 0.144 # Scalar::Util any 1.63 # Scope::Guard any 0.21 # Specio 0.40 0.48 # Specio::Declare any 0.48 # Specio::Library::Builtins any 0.48 # Specio::Library::Numeric any 0.48 # Specio::Library::Path::Tiny 0.04 0.05 # Specio::Library::String any 0.48 # Test::Builder any 1.302195 # Text::Diff 1.44 1.45 # Text::Diff::Table any 1.44 # Text::ParseWords any 3.31 # Time::Duration::Parse any 0.16 # Try::Tiny any 0.31 # base any 2.27 # constant any 1.33 # strict any 1.12 # warnings any 1.65 # # === Runtime Recommends === # # Module Want Have # --------------------- ---- ---- # Parallel::ForkManager any 2.02 # t/00-report-prereqs.t .......... ok could not find tidyall.ini or .tidyallrc upwards from '/tmp/Code-TidyAll-7YP7/global_ignore' at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/lib/Code/TidyAll.pm line 742. could not find tidyall.ini or .tidyallrc upwards from '/tmp/Code-TidyAll-7YP7/plugin_ignore' at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/lib/Code/TidyAll.pm line 742. t/Basic.t ...................... ok t/Conf.t ....................... ok t/diff-on-tidy-error.t ......... ok t/Git.t ........................ ok t/parallel.t ................... ok t/Plugin-CSSUnminifier.t ....... ok t/Plugin-GenericTransformer.t .. ok t/Plugin-GenericValidator.t .... ok t/Plugin-JSBeautify.t .......... ok t/Plugin-JSHint.t .............. ok t/Plugin-JSLint.t .............. ok t/Plugin-MasonTidy.t ........... ok t/Plugin-PerlCritic.t .......... ok t/Plugin-PerlTidy.t ............ ok t/Plugin-PerlTidySweet.t ....... ok t/Plugin-PHPCodeSniffer.t ...... ok t/Plugin-PodChecker.t .......... ok # Failed test 'state=checked' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 84. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # got: 'error' # expected: 'checked' # Failed test 'no error' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 85. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # got: 'unrecognized words: # Around # ERRORS # Hey # POD # The # Unknown # above # are # below # brown # coding # directive # document # dogs # errors # explained # fox # had # jumped # lazy # line # over # quick # some # the # which' # expected: undef # Looks like you failed 2 tests of 3. # Failed test 'ok' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 96. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # Failed test 'error message' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 93. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # 'unrecognized words: # Around # ERRORS # Hey # POD # The # Unknown # above # are # below # browwn # coding # directive # document # dogs # errors # explained # fox # had # jumped # lazeey # line # over # quick # some # the # which' # doesn't match '(?^:unrecognized words:\nbrowwn\nlazeey)' # Looks like you failed 1 test of 2. # Failed test 'spelling mistakes' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 96. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # Failed test 'error message' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 93. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # 'unrecognized words: # Around # ERRORS # Hey # POD # The # Unknown # above # are # below # coding # directive # document # dogs # errors # explained # fox # had # jumped # lazeey # line # over # quick # some # the # which' # doesn't match '(?^:unrecognized words:\nlazeey)' # Looks like you failed 1 test of 2. # Failed test 'spelling mistakes, one in dictionary' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 96. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # Failed test 'state=checked' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 84. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # got: 'error' # expected: 'checked' # Failed test 'no error' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 85. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # got: 'unrecognized words: # Around # ERRORS # Hey # POD # The # Unknown # above # are # below # coding # directive # document # dogs # errors # explained # fox # had # jumped # line # over # quick # some # the # which' # expected: undef # Looks like you failed 2 tests of 3. # Failed test 'spelling mistakes, all in dictionary' # at /home/tkloczko/rpmbuild/BUILD/Code-TidyAll-0.83/t/lib/TestFor/Code/TidyAll/Plugin.pm line 96. # (in TestFor::Code::TidyAll::Plugin::PodSpell->test_main) # Looks like you failed 4 tests of 4. t/Plugin-PodSpell.t ............ Dubious, test returned 4 (wstat 1024, 0x400) Failed 4/4 subtests t/Plugin-PodTidy.t ............. ok t/Plugin-SortLines.t ........... ok t/spaces-in-paths.t ............ ok t/Util.t ....................... ok t/Zglob.t ...................... ok Test Summary Report ------------------- t/Plugin-PodSpell.t (Wstat: 1024 Tests: 4 Failed: 4) Failed tests: 1-4 Non-zero exit status: 4 Files=24, Tests=222, 12 wallclock secs ( 0.20 usr 0.07 sys + 10.33 cusr 1.53 csys = 12.13 CPU) Result: FAIL Failed 1/24 test programs. 4/222 subtests failed. make: *** [Makefile:908: test_dynamic] Error 255 ```

I'm not sure what king of details I should provide to diagnose this issue. Please let me know if you need more details.

autarch commented 1 year ago

I'm not seeing the same issue when I test with Perl 5.38.0 locally. I'm guessing the issue is that you have some local ispell config that's different than what the tests expect.

The tests could probably be made more robust against this thing. A PR to do so would be welcome!

kloczek commented 1 year ago

I'm using hunspell (which is installed in build env) so what needs to be done to be able to allow test suite with hunspell? 🤔

autarch commented 1 year ago

I'm a bit confused. How are you using hunspell with the tests? The tests use the default command, which is ispell. Do you have a symlink or something?

kloczek commented 1 year ago

If you will look on Distributions like Fedora/RH and derivates you can find that they've abandoned using ispell and most of the distributions are using now hunspell because that is spell checker used by LibreOffice and effectively most of the development done today around spell checkers is done on top of that project.

IMO it wold be good somehow adapt perl-code-tidyall to be able build and test it against other like spell checkers like hunspell. I'll try to check perl-code-tidyall and prepare some kind of JFDI patch to use hunspell instead ispell. Will let you know when I'll finish that patch.