List the tools in the README.

This commit is contained in:
Andrew Hamilton 2016-11-19 13:50:07 +01:00
parent 746f067772
commit 0f85dbbbbd
3 changed files with 116 additions and 27 deletions

View file

@ -22,3 +22,50 @@ To run on an older ubuntu you can checkout an older version of vigil.
e.g. After cloning do: e.g. After cloning do:
# git checkout ubuntu-15.10 # git checkout ubuntu-15.10
### Tools
#### py
python_syntax python_unittests pydoc mypy python_coverage python_profile pycodestyle pyflakes pylint python_gut python_modulefinder python_mccabe bandit
#### pyc
disassemble_pyc
#### pl pm t
perl_syntax perldoc perltidy
#### pod pod6
perldoc
#### java
uncrustify
#### c h
splint uncrustify
#### o
objdump_headers objdump_disassemble readelf
#### cpp
bcpp uncrustify
#### pdf
pdf2txt
#### html
html_syntax tidy html2text
#### php
php5_syntax
#### zip
unzip
#### tar.gz tgz
tar_gz
#### tar.bz2
tar_bz2
#### a so
nm

40
make-readme.py Executable file
View file

@ -0,0 +1,40 @@
#!/usr/bin/env python3
import tools
BODY = """\
# Vigil Code Monitor
### Summary
Vigil shows a list of status reports for a given codebase, and keeps them
up to date as the codebase changes.
### Installation
To run vigil: (Tested in Ubuntu 16.10 in gnome-terminal and stterm)
# git clone https://github.com/ahamilton/vigil
# cd vigil
# ./install-dependencies
# ./vigil <directory_path>
and to test its working properly:
# ./test-all
To run on an older ubuntu you can checkout an older version of vigil.
e.g. After cloning do:
# git checkout ubuntu-15.10
### Tools"""
print(BODY)
for extensions, tools_ in tools.TOOLS_FOR_EXTENSIONS:
print()
print("#### " + " ".join(extensions))
print(" " + " ".join(tool.__name__ for tool in tools_))

View file

@ -707,34 +707,36 @@ def _generic_tools():
return [contents, metadata] return [contents, metadata]
def _tools_for_extension(): TOOLS_FOR_EXTENSIONS = \
return { [
"py": [python_syntax, python_unittests, pydoc, mypy, python_coverage, (["py"], [python_syntax, python_unittests, pydoc, mypy, python_coverage,
python_profile, pycodestyle, pyflakes, pylint, python_gut, python_profile, pycodestyle, pyflakes, pylint, python_gut,
python_modulefinder, python_mccabe, bandit], python_modulefinder, python_mccabe, bandit]),
"pyc": [disassemble_pyc], (["pyc"], [disassemble_pyc]),
"pl": [perl_syntax, perldoc, perltidy], (["pl", "pm", "t"], [perl_syntax, perldoc, perltidy]),
"pm": [perl_syntax, perldoc, perltidy], # (["p6", "pm6"], [perl6_syntax, perldoc]),
"t": [perl_syntax, perldoc, perltidy], (["pod", "pod6"], [perldoc]),
# "p6": [perl6_syntax, perldoc], (["java"], [uncrustify]),
# "pm6": [perl6_syntax, perldoc], (["c", "h"], [splint, uncrustify]),
"pod": [perldoc], (["o"], [objdump_headers, objdump_disassemble, readelf]),
"pod6": [perldoc], (["cpp"], [bcpp, uncrustify]),
"java": [uncrustify], (["pdf"], [pdf2txt]),
"c": [splint, uncrustify], (["html"], [html_syntax, tidy, html2text]),
"h": [splint, uncrustify], (["php"], [php5_syntax]),
"o": [objdump_headers, objdump_disassemble, readelf], (["zip"], [unzip]),
"zip": [unzip], (["tar.gz", "tgz"], [tar_gz]),
"tar.gz": [tar_gz], (["tar.bz2"], [tar_bz2]),
"tgz": [tar_gz], (["a", "so"], [nm]),
"tar.bz2": [tar_bz2], ]
"a": [nm],
"so": [nm],
"pdf": [pdf2txt], @functools.lru_cache(maxsize=1)
"html": [html_syntax, tidy, html2text], def _tools_for_extension():
"cpp": [bcpp, uncrustify], result = {}
"php": [php5_syntax], for extensions, tools in TOOLS_FOR_EXTENSIONS:
} for extension in extensions:
result[extension] = tools
return result
def tools_all(): def tools_all():