List the tools in the README.
This commit is contained in:
parent
746f067772
commit
0f85dbbbbd
3 changed files with 116 additions and 27 deletions
47
README.md
47
README.md
|
|
@ -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
40
make-readme.py
Executable 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_))
|
||||||
56
tools.py
56
tools.py
|
|
@ -707,34 +707,36 @@ def _generic_tools():
|
||||||
return [contents, metadata]
|
return [contents, metadata]
|
||||||
|
|
||||||
|
|
||||||
|
TOOLS_FOR_EXTENSIONS = \
|
||||||
|
[
|
||||||
|
(["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]),
|
||||||
|
# (["p6", "pm6"], [perl6_syntax, perldoc]),
|
||||||
|
(["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]),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@functools.lru_cache(maxsize=1)
|
||||||
def _tools_for_extension():
|
def _tools_for_extension():
|
||||||
return {
|
result = {}
|
||||||
"py": [python_syntax, python_unittests, pydoc, mypy, python_coverage,
|
for extensions, tools in TOOLS_FOR_EXTENSIONS:
|
||||||
python_profile, pycodestyle, pyflakes, pylint, python_gut,
|
for extension in extensions:
|
||||||
python_modulefinder, python_mccabe, bandit],
|
result[extension] = tools
|
||||||
"pyc": [disassemble_pyc],
|
return result
|
||||||
"pl": [perl_syntax, perldoc, perltidy],
|
|
||||||
"pm": [perl_syntax, perldoc, perltidy],
|
|
||||||
"t": [perl_syntax, perldoc, perltidy],
|
|
||||||
# "p6": [perl6_syntax, perldoc],
|
|
||||||
# "pm6": [perl6_syntax, perldoc],
|
|
||||||
"pod": [perldoc],
|
|
||||||
"pod6": [perldoc],
|
|
||||||
"java": [uncrustify],
|
|
||||||
"c": [splint, uncrustify],
|
|
||||||
"h": [splint, uncrustify],
|
|
||||||
"o": [objdump_headers, objdump_disassemble, readelf],
|
|
||||||
"zip": [unzip],
|
|
||||||
"tar.gz": [tar_gz],
|
|
||||||
"tgz": [tar_gz],
|
|
||||||
"tar.bz2": [tar_bz2],
|
|
||||||
"a": [nm],
|
|
||||||
"so": [nm],
|
|
||||||
"pdf": [pdf2txt],
|
|
||||||
"html": [html_syntax, tidy, html2text],
|
|
||||||
"cpp": [bcpp, uncrustify],
|
|
||||||
"php": [php5_syntax],
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def tools_all():
|
def tools_all():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue