Skip to content

Commit 7de39df

Browse files
committed
Update docstring and other help text #3941 #4556
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 7871563 commit 7de39df

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

src/scancode/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,7 @@ def default_processes():
418418
@click.option('--use-cached-results',
419419
is_flag=True,
420420
default=False,
421-
hidden=True,
422-
help='(EXPERIMENTAL) ScanCode will use cached results during scan time.',
421+
help='(EXPERIMENTAL) Enables the creation, update, and usage of cached results during scan time.',
423422
help_group=cliutils.CORE_GROUP, sort_order=250, cls=PluggableCommandLineOption)
424423
def scancode(
425424
ctx,

src/scancode/results_cache.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@ def get_results_cache_directory_location(results_cache_index, results_cache_dir=
5454
"""
5555
Return the location of the directory containing the cache files for a given
5656
`results_cache_index` hexstring.
57+
58+
A example of a `results_cache_index` string is
59+
"b0e3dd13b9b5980bb1ca7aab89e5490cb136952374489a755947ac004309b035"
60+
61+
This string is split into three parts containing:
62+
- the first and second character ("b0")
63+
- the third and fourth character ("e3")
64+
- the remaining characters
65+
("dd13b9b5980bb1ca7aab89e5490cb136952374489a755947ac004309b035").
66+
67+
The resulting results_cache_directory_location would be:
68+
"b0/e3/dd13b9b5980bb1ca7aab89e5490cb136952374489a755947ac004309b035".
69+
70+
In the cache directory, there would be a series of nested directories
71+
following the structure and naming above, where the last directory contains
72+
the results of the scanners run on a resource keyed by
73+
`results_cache_index`.
5774
"""
5875
# Split the hash into two subdirectories using the first two prefix pairs
5976
prefix1 = results_cache_index[:2]

0 commit comments

Comments
 (0)