Skip to content

Commit 1d8b9a8

Browse files
committed
added id for API calls
1 parent c987cde commit 1d8b9a8

File tree

1 file changed

+3
-1
lines changed
  • SecurityKeywordsBasedSearchTool/SecFeatFinder

1 file changed

+3
-1
lines changed

SecurityKeywordsBasedSearchTool/SecFeatFinder/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def process_feature_annotations(features_file, repo_dir, flattened_keywords, tax
3535

3636
library_features = set()
3737

38+
api_id = 1 # Initialize API ID for tagging
3839
for source in data.get('sources', []):
3940
for feature in source.get('files', []):
4041
file_path = os.path.join(repo_dir, feature.get('path', ''))
@@ -54,7 +55,8 @@ def process_feature_annotations(features_file, repo_dir, flattened_keywords, tax
5455

5556
if feature_names and line_index < len(lines):
5657
for feature_name in feature_names:
57-
tag = f"API_{feature_name}_{method_name}"
58+
tag = f"API_{api_id}_{feature_name}_{method_name}"
59+
api_id += 1
5860
line_annotations[line_index].add(tag)
5961
library_features.add(tag)
6062
if add_to_fm(fm, taxonomy, feature_name, tag) is None:

0 commit comments

Comments
 (0)