我已在 Win、OSX 和 Linux 上为 R 激活 GitHub 对 CI 的操作。 在 Windows 上只发生以下警告(变成错误)。

 * checking top-level files... WARNING Conversion of 'README.md' failed: [WARNING] This document format requires a nonempty <title> element. Please specify either 'title' or 'pagetitle' in the metadata, eg by using --metadata pagetitle="..." on the command line. Falling back to 'README'

这里是完整的报告。

似乎它是由 CMD 直接检查调用的,因此我无法更改对 pandoc 的调用。

另一方面,我尝试在README.Rmd header 中包含一个 pandoc 参数,正如这里所建议的那样:

 output: github_document: pandoc_args: "--number-offset=1,0" toc: true pagetitle: covid19ita

它没有效果。

注意:我不会从 CMD 检查中删除error_on = "warning" 。

我该怎么做才能使测试也通过胜利?

- 堆栈内存溢出
  繁体   English   中英

Windows R CMD 检查顶级文件:(README)[警告]此文档格式需要非空<title>元素&lt;/div&gt;</title><div id="text_translate"><p> 我已在 Win、OSX 和 Linux 上为 R 激活 GitHub 对 CI 的操作。 在 Windows 上只发生以下警告(变成错误)。</p><pre> * checking top-level files... WARNING Conversion of 'README.md' failed: [WARNING] This document format requires a nonempty &lt;title&gt; element. Please specify either 'title' or 'pagetitle' in the metadata, eg by using --metadata pagetitle="..." on the command line. Falling back to 'README'</pre><p> <a href="https://github.com/UBESP-DCTV/covid19ita/pull/62/checks?check_run_id=594799232" rel="nofollow noreferrer">这里</a>是完整的报告。</p><p> 似乎它是由 CMD 直接检查调用的,因此我无法更改对 pandoc 的调用。</p><p> 另一方面,我尝试在README.Rmd header 中包含一个 pandoc 参数,正如<a href="https://community.rstudio.com/t/rmarkdown-document-format-requires-a-nonempty-title-element/36774" rel="nofollow noreferrer">这里</a>所建议的那样:</p><pre> output: github_document: pandoc_args: "--number-offset=1,0" toc: true pagetitle: covid19ita</pre><p> 它没有效果。</p><p> 注意:我不会从 CMD 检查中删除error_on = "warning" 。</p><p> 我该怎么做才能使测试也通过胜利?</p></div>

[英]Windows R CMD check top-level files: (README) [WARNING] This document format requires a nonempty <title> element

我已在 Win、OSX 和 Linux 上为 R 激活 GitHub 对 CI 的操作。 在 Windows 上只发生以下警告(变成错误)。

* checking top-level files ... WARNING

Conversion of 'README.md' failed:

[WARNING] This document format requires a nonempty <title> element.

  Please specify either 'title' or 'pagetitle' in the metadata,

  e.g. by using --metadata pagetitle="..." on the command line.

  Falling back to 'README'

这里是完整的报告。

似乎它是由 CMD 直接检查调用的,因此我无法更改对 pandoc 的调用。

另一方面,我尝试在README.Rmd header 中包含一个 pandoc 参数,正如这里所建议的那样:

output:
  github_document: 
    pandoc_args: "--number-offset=1,0"
    toc: true
pagetitle: covid19ita

它没有效果。

注意:我不会从 CMD 检查中删除error_on = "warning"

我该怎么做才能使测试也通过胜利?

似乎主要问题与无法在呈现的文档中获取徽章有关。 可以在这里看到(通过 R3.5 但不是 R3.6),或者在这里(通过 R3.6 但不是 R3.5)和这里(丢失的徽章不再是 AppVeyor 之一,而是CodeCov 一)。

所以我目前的解决方案是确保所有徽章在检查操作发生之前之后都准备好(例如,仅使用 gh-action)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM