mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 23:54:02 +02:00
BaseTools/CodeQl: Give preference to Plugin settings
For the CodeQl `AuditOnly` flag, prioritize Plugin settings over global settings. This patch adjusts the logic for the global `AuditOnly` setting, placing it before the Plugin setting code. This ensures that Plugin settings take precedence over global settings. Cc: Sean Brogan <sean.brogan@microsoft.com> Cc: Joey Vagedes <joey.vagedes@gmail.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
This commit is contained in:
parent
06da7daab1
commit
fd619ec460
@ -3,6 +3,7 @@
|
||||
# A build plugin that analyzes a CodeQL database.
|
||||
#
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
##
|
||||
|
||||
@ -78,6 +79,11 @@ class CodeQlAnalyzePlugin(IUefiBuildPlugin):
|
||||
# Packages are allowed to specify package-specific query specifiers
|
||||
# in the package CI YAML file that override the global query specifier.
|
||||
audit_only = False
|
||||
global_audit_only = builder.env.GetValue("STUART_CODEQL_AUDIT_ONLY")
|
||||
if global_audit_only:
|
||||
if global_audit_only.strip().lower() == "true":
|
||||
audit_only = True
|
||||
|
||||
query_specifiers = None
|
||||
package_config_file = Path(os.path.join(
|
||||
self.package_path, self.package + ".ci.yaml"))
|
||||
@ -94,11 +100,6 @@ class CodeQlAnalyzePlugin(IUefiBuildPlugin):
|
||||
f"{str(package_config_file)}")
|
||||
query_specifiers = plugin_data["QuerySpecifiers"]
|
||||
|
||||
global_audit_only = builder.env.GetValue("STUART_CODEQL_AUDIT_ONLY")
|
||||
if global_audit_only:
|
||||
if global_audit_only.strip().lower() == "true":
|
||||
audit_only = True
|
||||
|
||||
if audit_only:
|
||||
logging.info(f"CodeQL Analyze plugin is in audit only mode for "
|
||||
f"{self.package} ({self.target}).")
|
||||
|
Loading…
x
Reference in New Issue
Block a user