我是Github的新手。我通常不编程,但是我想在这里为Google Code-In做一些事情。我在Github上提交了对xsf / xeps进行一些更改的请求请求,但是Travis CI出现了错误。TCI日志的结尾如下所示:
unable to parse xep-0363.xml
make: *** [build/xep-0363.html] Error 6
The command "make all" exited with 2.
2.88s$ echo "lint,$(xmllint --nonet --noout --noent --loaddtd --valid *.xml 2>&1 | wc -l)" | ./git-ratchet check -v
INFO: 2016/12/18 20:33:55 check.go:12: Parsing measures from stdin
INFO: 2016/12/18 20:33:58 check.go:14: Finished parsing measures from stdin
INFO: 2016/12/18 20:33:58 check.go:15: [{lint 4279 4279}]
INFO: 2016/12/18 20:33:58 check.go:21: Reading measures stored in git
INFO: 2016/12/18 20:33:58 git.go:14: git --no-pager log --notes=git-ratchet-1-master --pretty=format:'%H,%ae,%at,"%N",' HEAD
INFO: 2016/12/18 20:33:58 check.go:50: Checking passed measure against stored value
INFO: 2016/12/18 20:33:58 git.go:14: git --no-pager log --notes=git-ratchet-excuse-1-master --pretty=format:'%N' 8930133cb12cef58730b70ca2abac6523b19b6a7^1..HEAD
INFO: 2016/12/18 20:33:58 reader.go:169: Total excuses []
INFO: 2016/12/18 20:33:58 reader.go:183: Checking measures: lint lint
ERROR: 2016/12/18 20:33:58 reader.go:209: Measure rising: lint, delta 3 (0.07015902712815715 percents)
FATAL: 2016/12/18 20:33:58 check.go:63: One or more metrics currently failing.
The command "echo "lint,$(xmllint --nonet --noout --noent --loaddtd --valid *.xml 2>&1 | wc -l)" | ./git-ratchet check -v" exited with 50.
Done. Your build exited with 1.
在The command "make all" exited with 2.
与The command "echo "lint,$(xmllint --nonet --noout --noent --loaddtd --valid *.xml 2>&1 | wc -l)" | ./git-ratchet check -v" exited with 50.
线分别为红色。
这里发生了什么?
好的,我正在对此进行编辑,以补充说,我已经尝试了@melpomene在下面的答案中建议的内容。但是,我尝试删除该行4次,然后重新压缩提交内容,并且该内容不断出现。我该如何解决?
根据该版本的Travis配置:
{
"addons": {
"apt": {
"packages": [
"xsltproc",
"libxml2-utils"
]
}
},
"before_install": [
"wget -O git-ratchet https://github.com/iangrunert/git-ratchet/releases/download/v0.3.1/linux_amd64_git-ratchet",
"chmod +x git-ratchet",
"git fetch https://github.com/xsf/xeps.git refs/notes/*:refs/notes/*"
],
"script": [
"make all",
"echo \"lint,$(xmllint --nonet --noout --noent --loaddtd --valid *.xml 2>&1 | wc -l)\" | ./git-ratchet check -v"
],
"language": "ruby",
"group": "stable",
"dist": "precise",
"os": "linux"
}
...直接来自该回购协议.travis.yml
:
addons:
apt:
packages:
- xsltproc
- libxml2-utils
before_install:
- wget -O git-ratchet https://github.com/iangrunert/git-ratchet/releases/download/v0.3.1/linux_amd64_git-ratchet
- chmod +x git-ratchet
- git fetch https://github.com/xsf/xeps.git refs/notes/*:refs/notes/*
script:
- make all
- echo "lint,$(xmllint --nonet --noout --noent --loaddtd --valid *.xml 2>&1 | wc -l)" | ./git-ratchet check -v
有人通过设置密钥自定义了构建步骤script
。
的值script
可以是单个shell命令,也可以是travis要执行的shell命令列表。它们都已运行,但是如果其中任何一个失败(通过返回非零退出状态),则整个构建都视为失败。
红线来自Travis,告诉您哪个命令失败以及退出状态。
至于这些命令的实际作用以及错误的含义,取决于项目。我对此并不熟悉,但是失败之前的最后几行输出是:
xep-0363.xml:249: parser error : XML declaration allowed only at the start of the document
<?xml version='1.0' encoding='UTF-8'?>
^
xep-0363.xml:249: parser error : XML declaration allowed only at the start of the document
<?xml version='1.0' encoding='UTF-8'?>
^
unable to parse xep-0363.xml
make: *** [build/xep-0363.html] Error 6
确实,您的提交<?xml ...?>
在文件中间引入了一行,因此这可能是破坏构建的原因。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句