|
@@ 25-34 (lines=10) @@
|
| 22 |
|
return False |
| 23 |
|
|
| 24 |
|
|
| 25 |
|
def has_empty_references(yaml_file, product_yaml=None): |
| 26 |
|
rule = yaml.open_and_macro_expand(yaml_file, product_yaml) |
| 27 |
|
if 'references' in rule and rule['references'] is None: |
| 28 |
|
return True |
| 29 |
|
|
| 30 |
|
if 'references' in rule and rule['references'] is not None: |
| 31 |
|
for _, value in rule['references'].items(): |
| 32 |
|
if str(value).strip() == "": |
| 33 |
|
return True |
| 34 |
|
return False |
| 35 |
|
|
| 36 |
|
|
| 37 |
|
def has_prefix_cce(yaml_file, product_yaml=None): |
|
@@ 13-22 (lines=10) @@
|
| 10 |
|
import ssg |
| 11 |
|
|
| 12 |
|
|
| 13 |
|
def has_empty_identifier(yaml_file, product_yaml=None): |
| 14 |
|
rule = yaml.open_and_macro_expand(yaml_file, product_yaml) |
| 15 |
|
if 'identifiers' in rule and rule['identifiers'] is None: |
| 16 |
|
return True |
| 17 |
|
|
| 18 |
|
if 'identifiers' in rule and rule['identifiers'] is not None: |
| 19 |
|
for _, value in rule['identifiers'].items(): |
| 20 |
|
if str(value).strip() == "": |
| 21 |
|
return True |
| 22 |
|
return False |
| 23 |
|
|
| 24 |
|
|
| 25 |
|
def has_empty_references(yaml_file, product_yaml=None): |