xenoterracide / dist-zilla-plugin-test-podspelling Goto Github PK
View Code? Open in Web Editor NEWAuthor tests for POD spelling
Home Page: http://search.cpan.org/dist/Dist-Zilla-Plugin-Test-PodSpelling/
Author tests for POD spelling
Home Page: http://search.cpan.org/dist/Dist-Zilla-Plugin-Test-PodSpelling/
I wonder how to put into my dist.ini file a stopword "d'être"?. In my POD file, I am expressing it this way: raison d'E<234>tre.
Here is a dump what I have in my dist.ini (actually, a copy in a.tmp) :
computer$ od -cxw80 a.tmp 0000000 s t o p w o r d s = d ' 303 252 t r e \n 7473 706f 6f77 6472 2073 203d 2764 aac3 7274 0a65
Thanks for any advise and help,
Martin ([email protected])
It would be handy to extract stopwords from the pod itself, similarly to how [PodCoverageTests] extracts subs to skip via "=for Pod::Coverage foo bar baz". That way plugin bundles don't need to handle a 'stopwords' mvp argument, or dist.inis kept in sync with .pm files -- the pod itself can include the stopword directive.
test fail
$ make -j2 test
PERL_DL_NONLAZY=1 /usr/bin/perl5.14.2 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-compile.t ................ ok
#
You should load Test::Tester before Test::Builder (or anything that loads Test::Builder) at /usr/lib/perl5/vendor_perl/5.12.2/Test/Tester.pm line 9, <DATA> line 1002.
#
# perl: v5.14.2 (wanted 5.008) on linux from /usr/bin/perl5.14.2
#
# Cwd => 3.36 (want any version)
# Dist::Zilla::Plugin::InlineFiles => 4.300003 (want any version)
# Dist::Zilla::Role::TextTemplate => 4.300003 (want any version)
# Dist::Zilla::Tester => 4.300003 (want any version)
# English => 1.04 (want any version)
# ExtUtils::MakeMaker => 6.62 (want 6.30)
# File::Find => 1.19 (want any version)
# File::Temp => 0.22 (want any version)
# Moose => 2.0205 (want any version)
# Path::Class => 0.24 (want any version)
# Pod::Wordlist::hanekomu => 1.110090 (want any version)
# Test::More => 0.98 (want 0.88)
# Test::Spelling => 0.15 (want any version)
# Test::Tester => 0.107 (want any version)
# strict => 1.04 (want any version)
# warnings => 1.12 (want any version)
#
# Thanks for using my code. I hope it works for you.
# If not, please try and include this output in the bug report.
# That will help me reproduce the issue and solve you problem.
#
t/000-report-versions-tiny.t .. ok
t/author-critic.t ............. skipped: these tests are for testing by the author
t/author-pod-spell.t .......... skipped: these tests are for testing by the author
# Failed test 'subtest 'POD spelling for lib/Foo.pm' of 'spell check pod for foo' compare ok'
# at t/checked.t line 53.
# got: '0'
# expected: '1'
# Failed test 'subtest 'POD spelling for lib/Foo.pm' of 'spell check pod for nobin' compare ok'
# at t/checked.t line 53.
# got: '0'
# expected: '1'
# Looks like you failed 2 tests of 15.
t/checked.t ...................
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/15 subtests
t/release-cpan-changes.t ...... skipped: these tests are for release candidate testing
t/release-dist-manifest.t ..... skipped: these tests are for release candidate testing
t/release-distmeta.t .......... skipped: these tests are for release candidate testing
t/release-eol.t ............... skipped: these tests are for release candidate testing
t/release-kwalitee.t .......... skipped: these tests are for release candidate testing
t/release-meta-json.t ......... skipped: these tests are for release candidate testing
t/release-minimum-version.t ... skipped: these tests are for release candidate testing
t/release-mojibake.t .......... skipped: these tests are for release candidate testing
t/release-pod-coverage.t ...... skipped: these tests are for release candidate testing
t/release-pod-syntax.t ........ skipped: these tests are for release candidate testing
t/release-portability.t ....... skipped: these tests are for release candidate testing
t/release-test-version.t ...... skipped: these tests are for release candidate testing
t/release-unused-vars.t ....... skipped: these tests are for release candidate testing
Test Summary Report
-------------------
t/checked.t (Wstat: 512 Tests: 15 Failed: 2)
Failed tests: 7, 13
Non-zero exit status: 2
Files=18, Tests=18, 5 wallclock secs ( 0.07 usr 0.02 sys + 3.73 cusr 0.34 csys = 4.16 CPU)
Result: FAIL
Failed 1/18 test programs. 2/18 subtests failed.
It looks like there's a lot of different words that need to be added into the stopwords list on this distro I'm looking at. However, the "one word per line" rule junks up the dist.ini. It would be nice if stopwords would also run through a split /\s+/
through the array to allow you to put in multiple words on one line.
Nothing is printed.
Strawberry 5.14.0, 5.8.9.
I'm trying to build https://github.com/karenetheridge/Dist-Zilla-Plugin-OnlyCorePrereqs and I'm getting a complaint about a word that is in the stoplist:
xt/author/pod-spell.t .. 1/1
# Failed test 'POD spelling for lib/Dist/Zilla/Plugin/OnlyCorePrereqs.pm'
# at xt/author/pod-spell.t line 11.
# Errors:
# lifed
# Looks like you failed 1 test of 1.
the (built) code has:
=for :stopwords Karen Etheridge David Golden lifed blead irc
The generated test no longer contains all stopwords:
__DATA__
Karen
Etheridge
ether
David
Golden
dagolden
lib
Dist
Zilla
Plugin
OnlyCorePrereqs
The test was working properly a few days ago; I did update Pod::Wordlist from
latest-1 to latest earlier today, but I didn't see any relevant changes there.
There isn't a way to configure which directories or files are tested - it seems to use bin/ and lib/ only. Sometimes pod files appear somewhere else, such as the root of the repository, and these files should be tested as well.
Hi Xenoterracide,
I have this bit of work, karenetheridge#2, that lets one list stopwords in a file. Karen hasn't done anything with it and I'm wondering who is authoritative for this distro?
Thanks,
unicode stopwords from the dist.ini
are working right, but not if they are being pulled from another dzil source. It appears to be a problem with what is coming out of this regex
my ( $word ) = $_ =~ /(\w{2,})/xms;
A colleague of mine spotted that this plugin crashes the dzil test run. In his case, there was a dash separated by spaces on both sides in the copyright_holder line of dist.ini. The attached patch fixes it for that particular string by ignoring the non-words. Alternatively, you could change the split patter ' ', into a proper regexp /s+/.
Of course, there might be other places where same check needs to be added, but you know your code better and find them easier.
Yours,
-Heikki
lib/Dist/Zilla/Plugin/Test/PodSpelling.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Dist/Zilla/Plugin/Test/PodSpelling.pm b/lib/Dist/Zilla/Plugin/Test/PodSpelling.pm
index a8d89da..add4bed 100644
--- a/lib/Dist/Zilla/Plugin/Test/PodSpelling.pm
+++ b/lib/Dist/Zilla/Plugin/Test/PodSpelling.pm
@@ -57,7 +57,7 @@ around add_file => sub {
if ( $self->zilla->copyright_holder ) {
for ( split( ' ', $self->zilla->copyright_holder ) ) {
next unless $word;
$self->log_debug( 'copyright_holder word: ' . $word );
$self->push_stopwords( $word );
1.7.5.4
I try to use Test::PodSpelling but error ocuurs.
$ mkdir ~/.dzil/profiles/test/
$ echo '[Test::PodSpelling]' > ~/.dzil/profiles/test/profile.ini
$ dzil new -p test Foo
[DZ] making target dir /var/tmp/r/Foo
[DZ] no version was ever set
[DZ] no version was ever set at /usr/local/lib/perl/5.10.1/Moose/Meta/Method/Delegation.pm line 110.
Could you give me any adivice?
It's not clear if you want patches on build/master or master, since build/master is the default branch.
Could you please consider adding a CONTRIBUTORS file that clarifies?
Thanks,
David
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.