Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aboutcode-org/scancode-toolkit
/ get_rule_id_for_text
Function
get_rule_id_for_text
src/licensedcode/models.py:3007–3012 ·
view source on GitHub ↗
(text)
Source
from the content-addressed store, hash-verified
3005
3006
3007
def
get_rule_id_for_text(text):
3008
rule = rule_exists(text=text)
3009
if
rule:
3010
return
rule.identifier
3011
else
:
3012
return
False
3013
3014
3015
def
find_rule_base_location(name_prefix, rules_directory=rules_data_dir):
Callers
1
cli
Function · 0.90
Calls
1
rule_exists
Function · 0.85
Tested by
no test coverage detected