提交 47c96a61 编写于 作者: R Ryan Dahl

CI should fail when code isn't formatted.

上级 ae0dec39
......@@ -365,6 +365,7 @@ build_script:
test_script:
- python tools\lint.py
- python tools\test_format.py
- ps: Exec { & python tools\test.py $env:DENO_BUILD_PATH }
after_test:
......
......@@ -87,6 +87,7 @@ before_script:
- ./tools/setup.py
script:
- ./tools/lint.py
- ./tools/test_format.py
- bash -c "sleep 2100; pkill ninja" &
- ./tools/build.py -j2
- ./tools/test.py $DENO_BUILD_PATH
......
#!/usr/bin/env python
# This program fails if ./tools/format.py changes any files.
import sys
import util
import sys
import subprocess
def main(argv):
util.run([sys.executable, "tools/format.py"])
output = util.run_output(
["git", "status", "-uno", "--porcelain", "--ignore-submodules"])
if len(output) > 0:
print "Run tools/format.py "
print output
sys.exit(1)
if __name__ == '__main__':
main(sys.argv)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册