diff --git a/DESCRIPTION b/DESCRIPTION index 0a8f936d..5a1af3d5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,17 @@ Package: pegboard Title: Explore and Manipulate Markdown Curricula from the Carpentries -Version: 0.2.0 -Authors@R: +Version: 0.2.1 +Authors@R:c( person(given = "Zhian N.", family = "Kamvar", role = c("aut", "cre"), - email = "zkamvar@gmail.com", - comment = c(ORCID = "0000-0003-1458-7108")) + email = "zkamvar@carpentries.org", + comment = c(ORCID = "0000-0003-1458-7108")), + person(given = "Toby", + family = "Hodges", + role = c("ctb"), + email = "tobyhodges@carpentries.org"), + person()) Description: The Carpentries () curricula is made of of lessons that are hosted as websites. Each lesson represents between a half day to two days of instruction and contains several episodes, which are diff --git a/NEWS.md b/NEWS.md index 524291ce..8f9deedd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# pegboard 0.2.1 + +## MISC + + - The inline messages for link validation errors are more verbose (@tobyhodges, #79) + # pegboard 0.2.0 ## NEW FEATURES diff --git a/R/validate_links.R b/R/validate_links.R index c9520e51..ef49eaed 100644 --- a/R/validate_links.R +++ b/R/validate_links.R @@ -202,9 +202,9 @@ link_tests <- c( internal_file = "[missing file] {orig}", internal_well_formed = "[incorrect formatting]: [{text}][{orig}] -> [{text}]({orig})", all_reachable = "", - img_alt_text = "[missing alt-text]", - descriptive = "[uninformative text] {sQuote(text)}", - link_length = "[text too short] {sQuote(text)}", + img_alt_text = "[image missing alt-text]", + descriptive = "[uninformative link text] {sQuote(text)}", + link_length = "[link text too short] {sQuote(text)}", NULL ) diff --git a/man/pegboard-package.Rd b/man/pegboard-package.Rd index 101a95e7..abbbee90 100644 --- a/man/pegboard-package.Rd +++ b/man/pegboard-package.Rd @@ -19,7 +19,12 @@ Useful links: } \author{ -\strong{Maintainer}: Zhian N. Kamvar \email{zkamvar@gmail.com} (\href{https://orcid.org/0000-0003-1458-7108}{ORCID}) +\strong{Maintainer}: Zhian N. Kamvar \email{zkamvar@carpentries.org} (\href{https://orcid.org/0000-0003-1458-7108}{ORCID}) + +Other contributors: +\itemize{ + \item Toby Hodges \email{tobyhodges@carpentries.org} [contributor] +} } \keyword{internal} diff --git a/tests/testthat/_snaps/Lesson.md b/tests/testthat/_snaps/Lesson.md index c3a840c0..d412e298 100644 --- a/tests/testthat/_snaps/Lesson.md +++ b/tests/testthat/_snaps/Lesson.md @@ -155,8 +155,8 @@ - Images need alt-text ::warning file=_episodes/14-looping-data-sets.md,line=191:: [missing file] ../no-workie.svg - ::warning file=_episodes/14-looping-data-sets.md,line=195:: [missing alt-text] - ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=195:: [image missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [image missing alt-text] # Lessons can be validated [ansi] @@ -237,8 +237,8 @@ - Images need alt-text ::warning file=_episodes/14-looping-data-sets.md,line=191:: [missing file] ../no-workie.svg - ::warning file=_episodes/14-looping-data-sets.md,line=195:: [missing alt-text] - ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=195:: [image missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [image missing alt-text] # Lessons can be validated [unicode] @@ -319,8 +319,8 @@ - Images need alt-text ::warning file=_episodes/14-looping-data-sets.md,line=191:: [missing file] ../no-workie.svg - ::warning file=_episodes/14-looping-data-sets.md,line=195:: [missing alt-text] - ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=195:: [image missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [image missing alt-text] # Lessons can be validated [fancy] @@ -401,6 +401,6 @@ - Images need alt-text ::warning file=_episodes/14-looping-data-sets.md,line=191:: [missing file] ../no-workie.svg - ::warning file=_episodes/14-looping-data-sets.md,line=195:: [missing alt-text] - ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=195:: [image missing alt-text] + ::warning file=_episodes/14-looping-data-sets.md,line=197:: [missing file] ../no-workie.svg [image missing alt-text] diff --git a/tests/testthat/_snaps/validation.md b/tests/testthat/_snaps/validation.md index f2640311..72810497 100644 --- a/tests/testthat/_snaps/validation.md +++ b/tests/testthat/_snaps/validation.md @@ -71,8 +71,8 @@ - Images need alt-text - image-test.md:12 [missing alt-text] - image-test.md:41 [missing alt-text] + image-test.md:12 [image missing alt-text] + image-test.md:41 [image missing alt-text] --- @@ -85,8 +85,8 @@ - Images need alt-text _episodes/14-looping-data-sets.md:191 [missing file] ../no-workie.svg - _episodes/14-looping-data-sets.md:195 [missing alt-text] - _episodes/14-looping-data-sets.md:197 [missing file] ../no-workie.svg [missing alt-text] + _episodes/14-looping-data-sets.md:195 [image missing alt-text] + _episodes/14-looping-data-sets.md:197 [missing file] ../no-workie.svg [image missing alt-text] --- @@ -102,33 +102,33 @@ - Avoid uninformative link phrases - Avoid single-letter or missing link text - link-test.md:18 [uninformative text] 'link' - link-test.md:18 [uninformative text] 'this link' + link-test.md:18 [uninformative link text] 'link' + link-test.md:18 [uninformative link text] 'this link' link-test.md:22 [missing anchor] #bad-fragment link-test.md:29 [missing file] incorrect-link.html link-test.md:37 [incorrect formatting]: [should be a relative link][rel-image] -> [should be a relative link](rel-image) link-test.md:41 [missing file] files/ohno.txt link-test.md:45 [needs HTTPS] http://example.com - link-test.md:53 [uninformative text] 'this' - link-test.md:54 [uninformative text] 'link' - link-test.md:55 [uninformative text] 'this link' - link-test.md:56 [uninformative text] 'a link' - link-test.md:57 [uninformative text] 'link to' - link-test.md:58 [uninformative text] 'here' - link-test.md:59 [uninformative text] 'here for' - link-test.md:60 [uninformative text] 'click here for' - link-test.md:61 [uninformative text] 'over here for' - link-test.md:62 [uninformative text] 'more' - link-test.md:63 [uninformative text] 'more about' - link-test.md:64 [uninformative text] 'for more about' - link-test.md:65 [uninformative text] 'for more info about' - link-test.md:66 [uninformative text] 'for more information about' - link-test.md:67 [uninformative text] 'read more about' - link-test.md:68 [uninformative text] 'read more' - link-test.md:69 [uninformative text] 'read on' - link-test.md:70 [uninformative text] 'read on about' - link-test.md:71 [text too short] 'a' - link-test.md:72 [text too short] '' + link-test.md:53 [uninformative link text] 'this' + link-test.md:54 [uninformative link text] 'link' + link-test.md:55 [uninformative link text] 'this link' + link-test.md:56 [uninformative link text] 'a link' + link-test.md:57 [uninformative link text] 'link to' + link-test.md:58 [uninformative link text] 'here' + link-test.md:59 [uninformative link text] 'here for' + link-test.md:60 [uninformative link text] 'click here for' + link-test.md:61 [uninformative link text] 'over here for' + link-test.md:62 [uninformative link text] 'more' + link-test.md:63 [uninformative link text] 'more about' + link-test.md:64 [uninformative link text] 'for more about' + link-test.md:65 [uninformative link text] 'for more info about' + link-test.md:66 [uninformative link text] 'for more information about' + link-test.md:67 [uninformative link text] 'read more about' + link-test.md:68 [uninformative link text] 'read more' + link-test.md:69 [uninformative link text] 'read on' + link-test.md:70 [uninformative link text] 'read on about' + link-test.md:71 [link text too short] 'a' + link-test.md:72 [link text too short] '' # headings reporters will work [plain] @@ -267,8 +267,8 @@ - Images need alt-text - image-test.md:12 [missing alt-text] - image-test.md:41 [missing alt-text] + image-test.md:12 [image missing alt-text] + image-test.md:41 [image missing alt-text] --- @@ -284,33 +284,33 @@ - Avoid uninformative link phrases - Avoid single-letter or missing link text - link-test.md:18 [uninformative text] 'link' - link-test.md:18 [uninformative text] 'this link' + link-test.md:18 [uninformative link text] 'link' + link-test.md:18 [uninformative link text] 'this link' link-test.md:22 [missing anchor] #bad-fragment link-test.md:29 [missing file] incorrect-link.html link-test.md:37 [incorrect formatting]: [should be a relative link][rel-image] -> [should be a relative link](rel-image) link-test.md:41 [missing file] files/ohno.txt link-test.md:45 [needs HTTPS] http://example.com - link-test.md:53 [uninformative text] 'this' - link-test.md:54 [uninformative text] 'link' - link-test.md:55 [uninformative text] 'this link' - link-test.md:56 [uninformative text] 'a link' - link-test.md:57 [uninformative text] 'link to' - link-test.md:58 [uninformative text] 'here' - link-test.md:59 [uninformative text] 'here for' - link-test.md:60 [uninformative text] 'click here for' - link-test.md:61 [uninformative text] 'over here for' - link-test.md:62 [uninformative text] 'more' - link-test.md:63 [uninformative text] 'more about' - link-test.md:64 [uninformative text] 'for more about' - link-test.md:65 [uninformative text] 'for more info about' - link-test.md:66 [uninformative text] 'for more information about' - link-test.md:67 [uninformative text] 'read more about' - link-test.md:68 [uninformative text] 'read more' - link-test.md:69 [uninformative text] 'read on' - link-test.md:70 [uninformative text] 'read on about' - link-test.md:71 [text too short] 'a' - link-test.md:72 [text too short] '' + link-test.md:53 [uninformative link text] 'this' + link-test.md:54 [uninformative link text] 'link' + link-test.md:55 [uninformative link text] 'this link' + link-test.md:56 [uninformative link text] 'a link' + link-test.md:57 [uninformative link text] 'link to' + link-test.md:58 [uninformative link text] 'here' + link-test.md:59 [uninformative link text] 'here for' + link-test.md:60 [uninformative link text] 'click here for' + link-test.md:61 [uninformative link text] 'over here for' + link-test.md:62 [uninformative link text] 'more' + link-test.md:63 [uninformative link text] 'more about' + link-test.md:64 [uninformative link text] 'for more about' + link-test.md:65 [uninformative link text] 'for more info about' + link-test.md:66 [uninformative link text] 'for more information about' + link-test.md:67 [uninformative link text] 'read more about' + link-test.md:68 [uninformative link text] 'read more' + link-test.md:69 [uninformative link text] 'read on' + link-test.md:70 [uninformative link text] 'read on about' + link-test.md:71 [link text too short] 'a' + link-test.md:72 [link text too short] '' # links reporters will work [ansi] @@ -321,8 +321,8 @@ - Images need alt-text - image-test.md:12 [missing alt-text] - image-test.md:41 [missing alt-text] + image-test.md:12 [image missing alt-text] + image-test.md:41 [image missing alt-text] --- @@ -338,33 +338,33 @@ - Avoid uninformative link phrases - Avoid single-letter or missing link text - link-test.md:18 [uninformative text] 'link' - link-test.md:18 [uninformative text] 'this link' + link-test.md:18 [uninformative link text] 'link' + link-test.md:18 [uninformative link text] 'this link' link-test.md:22 [missing anchor] #bad-fragment link-test.md:29 [missing file] incorrect-link.html link-test.md:37 [incorrect formatting]: [should be a relative link][rel-image] -> [should be a relative link](rel-image) link-test.md:41 [missing file] files/ohno.txt link-test.md:45 [needs HTTPS] http://example.com - link-test.md:53 [uninformative text] 'this' - link-test.md:54 [uninformative text] 'link' - link-test.md:55 [uninformative text] 'this link' - link-test.md:56 [uninformative text] 'a link' - link-test.md:57 [uninformative text] 'link to' - link-test.md:58 [uninformative text] 'here' - link-test.md:59 [uninformative text] 'here for' - link-test.md:60 [uninformative text] 'click here for' - link-test.md:61 [uninformative text] 'over here for' - link-test.md:62 [uninformative text] 'more' - link-test.md:63 [uninformative text] 'more about' - link-test.md:64 [uninformative text] 'for more about' - link-test.md:65 [uninformative text] 'for more info about' - link-test.md:66 [uninformative text] 'for more information about' - link-test.md:67 [uninformative text] 'read more about' - link-test.md:68 [uninformative text] 'read more' - link-test.md:69 [uninformative text] 'read on' - link-test.md:70 [uninformative text] 'read on about' - link-test.md:71 [text too short] 'a' - link-test.md:72 [text too short] '' + link-test.md:53 [uninformative link text] 'this' + link-test.md:54 [uninformative link text] 'link' + link-test.md:55 [uninformative link text] 'this link' + link-test.md:56 [uninformative link text] 'a link' + link-test.md:57 [uninformative link text] 'link to' + link-test.md:58 [uninformative link text] 'here' + link-test.md:59 [uninformative link text] 'here for' + link-test.md:60 [uninformative link text] 'click here for' + link-test.md:61 [uninformative link text] 'over here for' + link-test.md:62 [uninformative link text] 'more' + link-test.md:63 [uninformative link text] 'more about' + link-test.md:64 [uninformative link text] 'for more about' + link-test.md:65 [uninformative link text] 'for more info about' + link-test.md:66 [uninformative link text] 'for more information about' + link-test.md:67 [uninformative link text] 'read more about' + link-test.md:68 [uninformative link text] 'read more' + link-test.md:69 [uninformative link text] 'read on' + link-test.md:70 [uninformative link text] 'read on about' + link-test.md:71 [link text too short] 'a' + link-test.md:72 [link text too short] '' # links reporters will work [unicode] @@ -375,8 +375,8 @@ - Images need alt-text - image-test.md:12 [missing alt-text] - image-test.md:41 [missing alt-text] + image-test.md:12 [image missing alt-text] + image-test.md:41 [image missing alt-text] --- @@ -392,33 +392,33 @@ - Avoid uninformative link phrases - Avoid single-letter or missing link text - link-test.md:18 [uninformative text] 'link' - link-test.md:18 [uninformative text] 'this link' + link-test.md:18 [uninformative link text] 'link' + link-test.md:18 [uninformative link text] 'this link' link-test.md:22 [missing anchor] #bad-fragment link-test.md:29 [missing file] incorrect-link.html link-test.md:37 [incorrect formatting]: [should be a relative link][rel-image] -> [should be a relative link](rel-image) link-test.md:41 [missing file] files/ohno.txt link-test.md:45 [needs HTTPS] http://example.com - link-test.md:53 [uninformative text] 'this' - link-test.md:54 [uninformative text] 'link' - link-test.md:55 [uninformative text] 'this link' - link-test.md:56 [uninformative text] 'a link' - link-test.md:57 [uninformative text] 'link to' - link-test.md:58 [uninformative text] 'here' - link-test.md:59 [uninformative text] 'here for' - link-test.md:60 [uninformative text] 'click here for' - link-test.md:61 [uninformative text] 'over here for' - link-test.md:62 [uninformative text] 'more' - link-test.md:63 [uninformative text] 'more about' - link-test.md:64 [uninformative text] 'for more about' - link-test.md:65 [uninformative text] 'for more info about' - link-test.md:66 [uninformative text] 'for more information about' - link-test.md:67 [uninformative text] 'read more about' - link-test.md:68 [uninformative text] 'read more' - link-test.md:69 [uninformative text] 'read on' - link-test.md:70 [uninformative text] 'read on about' - link-test.md:71 [text too short] 'a' - link-test.md:72 [text too short] '' + link-test.md:53 [uninformative link text] 'this' + link-test.md:54 [uninformative link text] 'link' + link-test.md:55 [uninformative link text] 'this link' + link-test.md:56 [uninformative link text] 'a link' + link-test.md:57 [uninformative link text] 'link to' + link-test.md:58 [uninformative link text] 'here' + link-test.md:59 [uninformative link text] 'here for' + link-test.md:60 [uninformative link text] 'click here for' + link-test.md:61 [uninformative link text] 'over here for' + link-test.md:62 [uninformative link text] 'more' + link-test.md:63 [uninformative link text] 'more about' + link-test.md:64 [uninformative link text] 'for more about' + link-test.md:65 [uninformative link text] 'for more info about' + link-test.md:66 [uninformative link text] 'for more information about' + link-test.md:67 [uninformative link text] 'read more about' + link-test.md:68 [uninformative link text] 'read more' + link-test.md:69 [uninformative link text] 'read on' + link-test.md:70 [uninformative link text] 'read on about' + link-test.md:71 [link text too short] 'a' + link-test.md:72 [link text too short] '' # links reporters will work [fancy] @@ -429,8 +429,8 @@ - Images need alt-text - image-test.md:12 [missing alt-text] - image-test.md:41 [missing alt-text] + image-test.md:12 [image missing alt-text] + image-test.md:41 [image missing alt-text] --- @@ -446,33 +446,33 @@ - Avoid uninformative link phrases - Avoid single-letter or missing link text - link-test.md:18 [uninformative text] 'link' - link-test.md:18 [uninformative text] 'this link' + link-test.md:18 [uninformative link text] 'link' + link-test.md:18 [uninformative link text] 'this link' link-test.md:22 [missing anchor] #bad-fragment link-test.md:29 [missing file] incorrect-link.html link-test.md:37 [incorrect formatting]: [should be a relative link][rel-image] -> [should be a relative link](rel-image) link-test.md:41 [missing file] files/ohno.txt link-test.md:45 [needs HTTPS] http://example.com - link-test.md:53 [uninformative text] 'this' - link-test.md:54 [uninformative text] 'link' - link-test.md:55 [uninformative text] 'this link' - link-test.md:56 [uninformative text] 'a link' - link-test.md:57 [uninformative text] 'link to' - link-test.md:58 [uninformative text] 'here' - link-test.md:59 [uninformative text] 'here for' - link-test.md:60 [uninformative text] 'click here for' - link-test.md:61 [uninformative text] 'over here for' - link-test.md:62 [uninformative text] 'more' - link-test.md:63 [uninformative text] 'more about' - link-test.md:64 [uninformative text] 'for more about' - link-test.md:65 [uninformative text] 'for more info about' - link-test.md:66 [uninformative text] 'for more information about' - link-test.md:67 [uninformative text] 'read more about' - link-test.md:68 [uninformative text] 'read more' - link-test.md:69 [uninformative text] 'read on' - link-test.md:70 [uninformative text] 'read on about' - link-test.md:71 [text too short] 'a' - link-test.md:72 [text too short] '' + link-test.md:53 [uninformative link text] 'this' + link-test.md:54 [uninformative link text] 'link' + link-test.md:55 [uninformative link text] 'this link' + link-test.md:56 [uninformative link text] 'a link' + link-test.md:57 [uninformative link text] 'link to' + link-test.md:58 [uninformative link text] 'here' + link-test.md:59 [uninformative link text] 'here for' + link-test.md:60 [uninformative link text] 'click here for' + link-test.md:61 [uninformative link text] 'over here for' + link-test.md:62 [uninformative link text] 'more' + link-test.md:63 [uninformative link text] 'more about' + link-test.md:64 [uninformative link text] 'for more about' + link-test.md:65 [uninformative link text] 'for more info about' + link-test.md:66 [uninformative link text] 'for more information about' + link-test.md:67 [uninformative link text] 'read more about' + link-test.md:68 [uninformative link text] 'read more' + link-test.md:69 [uninformative link text] 'read on' + link-test.md:70 [uninformative link text] 'read on about' + link-test.md:71 [link text too short] 'a' + link-test.md:72 [link text too short] '' # div reporters will work [plain] @@ -593,33 +593,33 @@ - Avoid uninformative link phrases - Avoid single-letter or missing link text - ::warning file=link-test.md,line=18:: [uninformative text] 'link' - ::warning file=link-test.md,line=18:: [uninformative text] 'this link' + ::warning file=link-test.md,line=18:: [uninformative link text] 'link' + ::warning file=link-test.md,line=18:: [uninformative link text] 'this link' ::warning file=link-test.md,line=22:: [missing anchor] #bad-fragment ::warning file=link-test.md,line=29:: [missing file] incorrect-link.html ::warning file=link-test.md,line=37:: [incorrect formatting]: [should be a relative link][rel-image] -> [should be a relative link](rel-image) ::warning file=link-test.md,line=41:: [missing file] files/ohno.txt ::warning file=link-test.md,line=45:: [needs HTTPS] http://example.com - ::warning file=link-test.md,line=53:: [uninformative text] 'this' - ::warning file=link-test.md,line=54:: [uninformative text] 'link' - ::warning file=link-test.md,line=55:: [uninformative text] 'this link' - ::warning file=link-test.md,line=56:: [uninformative text] 'a link' - ::warning file=link-test.md,line=57:: [uninformative text] 'link to' - ::warning file=link-test.md,line=58:: [uninformative text] 'here' - ::warning file=link-test.md,line=59:: [uninformative text] 'here for' - ::warning file=link-test.md,line=60:: [uninformative text] 'click here for' - ::warning file=link-test.md,line=61:: [uninformative text] 'over here for' - ::warning file=link-test.md,line=62:: [uninformative text] 'more' - ::warning file=link-test.md,line=63:: [uninformative text] 'more about' - ::warning file=link-test.md,line=64:: [uninformative text] 'for more about' - ::warning file=link-test.md,line=65:: [uninformative text] 'for more info about' - ::warning file=link-test.md,line=66:: [uninformative text] 'for more information about' - ::warning file=link-test.md,line=67:: [uninformative text] 'read more about' - ::warning file=link-test.md,line=68:: [uninformative text] 'read more' - ::warning file=link-test.md,line=69:: [uninformative text] 'read on' - ::warning file=link-test.md,line=70:: [uninformative text] 'read on about' - ::warning file=link-test.md,line=71:: [text too short] 'a' - ::warning file=link-test.md,line=72:: [text too short] '' + ::warning file=link-test.md,line=53:: [uninformative link text] 'this' + ::warning file=link-test.md,line=54:: [uninformative link text] 'link' + ::warning file=link-test.md,line=55:: [uninformative link text] 'this link' + ::warning file=link-test.md,line=56:: [uninformative link text] 'a link' + ::warning file=link-test.md,line=57:: [uninformative link text] 'link to' + ::warning file=link-test.md,line=58:: [uninformative link text] 'here' + ::warning file=link-test.md,line=59:: [uninformative link text] 'here for' + ::warning file=link-test.md,line=60:: [uninformative link text] 'click here for' + ::warning file=link-test.md,line=61:: [uninformative link text] 'over here for' + ::warning file=link-test.md,line=62:: [uninformative link text] 'more' + ::warning file=link-test.md,line=63:: [uninformative link text] 'more about' + ::warning file=link-test.md,line=64:: [uninformative link text] 'for more about' + ::warning file=link-test.md,line=65:: [uninformative link text] 'for more info about' + ::warning file=link-test.md,line=66:: [uninformative link text] 'for more information about' + ::warning file=link-test.md,line=67:: [uninformative link text] 'read more about' + ::warning file=link-test.md,line=68:: [uninformative link text] 'read more' + ::warning file=link-test.md,line=69:: [uninformative link text] 'read on' + ::warning file=link-test.md,line=70:: [uninformative link text] 'read on about' + ::warning file=link-test.md,line=71:: [link text too short] 'a' + ::warning file=link-test.md,line=72:: [link text too short] '' # div reporters will work on CI