2017-10-27 12:39:50 +10:00
|
|
|
#!/usr/bin/env python3.6
|
2016-11-19 16:26:23 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2018-01-12 15:00:39 +10:00
|
|
|
# Copyright (C) 2018 Andrew Hamilton. All rights reserved.
|
2016-11-19 15:52:48 +01:00
|
|
|
# Licensed under the Artistic License 2.0.
|
|
|
|
|
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2017-06-27 14:03:32 +01:00
|
|
|
import vigil.tools as tools
|
2016-11-19 13:50:07 +01:00
|
|
|
|
|
|
|
|
|
2016-11-19 16:47:05 +01:00
|
|
|
def tool_markup(tool):
|
2016-11-19 17:24:01 +01:00
|
|
|
url = tools.url_of_tool(tool)
|
2018-05-15 16:34:52 +10:00
|
|
|
return (tool.__name__ if url is None else f"[{tool.__name__}]({url})")
|
2016-11-19 16:47:05 +01:00
|
|
|
|
|
|
|
|
|
2016-11-19 15:52:48 +01:00
|
|
|
print("""\
|
2016-11-19 13:50:07 +01:00
|
|
|
# Vigil Code Monitor
|
|
|
|
|
|
|
|
|
|
### Summary
|
|
|
|
|
|
2017-04-12 10:14:36 +02:00
|
|
|
Vigil maintains an up-to-date set of reports for every file in a codebase.
|
2016-11-19 13:50:07 +01:00
|
|
|
|
|
|
|
|
### Installation
|
|
|
|
|
|
2018-03-16 11:33:50 +10:00
|
|
|
(Tested in Ubuntu 18.04)
|
2016-11-19 13:50:07 +01:00
|
|
|
|
|
|
|
|
# git clone https://github.com/ahamilton/vigil
|
|
|
|
|
# cd vigil
|
|
|
|
|
# ./install-dependencies
|
2017-07-10 18:38:18 +01:00
|
|
|
# pip3 install .
|
|
|
|
|
|
|
|
|
|
To test its working properly:
|
|
|
|
|
|
|
|
|
|
# ./test-all
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2017-06-27 14:20:30 +01:00
|
|
|
then to run:
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2017-06-27 14:20:30 +01:00
|
|
|
# vigil <directory_path>
|
2016-11-19 13:50:07 +01:00
|
|
|
|
2016-11-19 15:58:21 +01:00
|
|
|
### Tools
|
|
|
|
|
|
|
|
|
|
Extensions | Tools
|
|
|
|
|
---------- | -----""")
|
2017-12-29 11:21:11 +10:00
|
|
|
all_tools = ([(["*"], tools.generic_tools() +
|
|
|
|
|
[tools.git_blame, tools.git_log])] +
|
2017-07-19 10:13:24 +01:00
|
|
|
tools.TOOLS_FOR_EXTENSIONS)
|
2017-07-19 09:40:54 +01:00
|
|
|
for extensions, tools_ in all_tools:
|
2016-11-19 15:58:21 +01:00
|
|
|
print("%s | %s" % (" ".join("." + extension for extension in extensions),
|
2016-11-19 16:47:05 +01:00
|
|
|
" • ".join(tool_markup(tool) for tool in tools_)))
|