forked from eclipse-score/reference_integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecategorize_guidelines.sh
More file actions
executable file
·31 lines (29 loc) · 1.37 KB
/
Copy pathrecategorize_guidelines.sh
File metadata and controls
executable file
·31 lines (29 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
RECATEGORIZE_SCRIPT="codeql-coding-standards-repo/scripts/guideline_recategorization/recategorize.py"
CODING_STANDARDS_CONFIG="./.github/codeql/coding-standards.yml"
CODING_STANDARDS_SCHEMA="codeql-coding-standards-repo/schemas/coding-standards-schema-1.0.0.json"
SARIF_SCHEMA="codeql-coding-standards-repo/schemas/sarif-schema-2.1.0.json"
SARIF_FILE="sarif-results/cpp.sarif"
mkdir -p sarif-results-recategorized
echo "Processing $SARIF_FILE for recategorization..."
python3 "$RECATEGORIZE_SCRIPT" \
--coding-standards-schema-file "$CODING_STANDARDS_SCHEMA" \
--sarif-schema-file "$SARIF_SCHEMA" \
"$CODING_STANDARDS_CONFIG" \
"$SARIF_FILE" \
"sarif-results-recategorized/$(basename "$SARIF_FILE")"
rm "$SARIF_FILE"
mv "sarif-results-recategorized/$(basename "$SARIF_FILE")" "$SARIF_FILE"
#adding filters later