Skip to content

Commit cd87fde

Browse files
authored
Add autocomplete feature (#4699)
Add autocomplete feature
1 parent 5e12ec3 commit cd87fde

4 files changed

Lines changed: 6 additions & 0 deletions

File tree

analyzer/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ sarif-tools==3.0.4
77
multiprocess==0.70.15
88
setuptools==70.2.0
99
semver==3.0.4
10+
argcomplete==3.5.1

bin/CodeChecker

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Used to kickstart CodeChecker.
1111
1212
Saves original environment without modifications.
1313
Used to run the logging in the same env.
14+
PYTHON_ARGCOMPLETE_OK
1415
"""
1516
# This is for enabling CodeChecker as a filename (i.e. module name).
1617
# pylint: disable=invalid-name

codechecker_common/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
"""
1010
Main CodeChecker script.
11+
PYTHON_ARGCOMPLETE_OK
1112
"""
1213

1314

@@ -18,6 +19,7 @@
1819
import os
1920
import signal
2021
import sys
22+
import argcomplete
2123

2224

2325
class ArgumentParser(argparse.ArgumentParser):
@@ -194,6 +196,7 @@ def signal_handler(signum, _):
194196
import traceback
195197
traceback.print_exc(file=sys.stdout)
196198

199+
argcomplete.autocomplete(parser)
197200
args = parser.parse_args()
198201

199202
# Call handler function to process configuration files. If there are

web/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ gitpython==3.1.41
1111
PyYAML==6.0.1
1212
types-PyYAML==6.0.12.12
1313
sarif-tools==3.0.4
14+
argcomplete==3.5.1
1415

1516
./api/py/codechecker_api/dist/codechecker_api.tar.gz
1617
./api/py/codechecker_api_shared/dist/codechecker_api_shared.tar.gz

0 commit comments

Comments
 (0)