-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
27 lines (23 loc) · 1.4 KB
/
Copy pathconfig.py
File metadata and controls
27 lines (23 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Central configuration for DevCheck: which tools to check and how to check them."""
from typing import Dict, List
# Each definition lists the possible executable names for a tool (some tools go
# by different names on different platforms) and the version flags to try, in
# order, until one produces usable output.
TOOL_DEFINITIONS: List[Dict[str, object]] = [
{"name": "Python", "commands": ["python3", "python"], "version_args": ["--version"]},
{"name": "Git", "commands": ["git"], "version_args": ["--version"]},
{"name": "Node.js", "commands": ["node"], "version_args": ["--version"]},
{"name": "npm", "commands": ["npm"], "version_args": ["--version"]},
{"name": "Java", "commands": ["java"], "version_args": ["--version", "-version"]},
{"name": "Java Compiler", "commands": ["javac"], "version_args": ["--version", "-version"]},
{"name": "pip", "commands": ["pip3", "pip"], "version_args": ["--version"]},
{"name": "VS Code", "commands": ["code"], "version_args": ["--version"]},
{"name": "Docker", "commands": ["docker"], "version_args": ["--version"]},
{"name": "Maven", "commands": ["mvn"], "version_args": ["--version", "-version"]},
]
# Maximum seconds to wait for a version command before giving up.
COMMAND_TIMEOUT_SECONDS = 5
# Directory and file names used for persisted data.
DATA_DIR_NAME = "data"
REPORTS_DIR_NAME = "reports"
SCAN_HISTORY_FILENAME = "scan_history.json"