Rename script-in-readme to script-docs

develop
lethosor 2016-07-26 22:51:42 -04:00
parent eef66b0db1
commit 29963f4b67
2 changed files with 5 additions and 4 deletions

@ -34,7 +34,7 @@ script:
- python travis/pr-check-base.py - python travis/pr-check-base.py
- python travis/lint.py - python travis/lint.py
- python travis/authors-rst.py - python travis/authors-rst.py
- python travis/script-in-readme.py - python travis/script-docs.py
- python travis/script-syntax.py --ext=lua --cmd="luac5.2 -p" - python travis/script-syntax.py --ext=lua --cmd="luac5.2 -p"
- python travis/script-syntax.py --ext=rb --cmd="ruby -c" - python travis/script-syntax.py --ext=rb --cmd="ruby -c"
- mkdir build-travis - mkdir build-travis

@ -4,6 +4,7 @@ import os
from os.path import basename, dirname, join, splitext from os.path import basename, dirname, join, splitext
import sys import sys
SCRIPT_PATH = sys.argv[1] if len(sys.argv) > 1 else 'scripts'
def expected_cmd(path): def expected_cmd(path):
"""Get the command from the name of a script.""" """Get the command from the name of a script."""
@ -54,9 +55,9 @@ def check_file(fname):
def main(): def main():
"""Check that all DFHack scripts include documentation (not 3rdparty)""" """Check that all DFHack scripts include documentation"""
err = 0 err = 0
for root, _, files in os.walk('scripts'): for root, _, files in os.walk(SCRIPT_PATH):
for f in files: for f in files:
if f[-3:] in {'.rb', 'lua'}: if f[-3:] in {'.rb', 'lua'}:
err += check_file(join(root, f)) err += check_file(join(root, f))
@ -64,4 +65,4 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(bool(main())) sys.exit(min(100, main()))