Skip to content

Commit 56d623d

Browse files
committed
Fix after review
1 parent 1dd5c97 commit 56d623d

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/pysonar_scanner/configuration/environment_variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ def load_properties_env_variables():
6363
env_var_name = prop.env_variable_name()
6464
if env_var_name in os.environ:
6565
properties[prop.name] = os.environ[env_var_name]
66-
if prop.deprecated:
66+
if prop.deprecation_message:
6767
logging.warning(prop.deprecation_message)
6868
return properties

src/pysonar_scanner/configuration/properties.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@
9393
SONAR_WORKING_DIRECTORY: Key = "sonar.working.directory"
9494
SONAR_SCM_FORCE_RELOAD_ALL: Key = "sonar.scm.forceReloadAll"
9595
SONAR_MODULES: Key = "sonar.modules"
96-
SONAR_PYTHON_XUNIT_REPORT_PATH = "sonar.python.xunit.reportPath"
97-
SONAR_PYTHON_XUNIT_SKIP_DETAILS = "sonar.python.xunit.skipDetails"
98-
SONAR_PYTHON_MYPY_REPORT_PATHS = "sonar.python.mypy.reportPaths"
99-
SONAR_PYTHON_BANDIT_REPORT_PATHS = "sonar.python.bandit.reportPaths"
100-
SONAR_PYTHON_FLAKE8_REPORT_PATHS = "sonar.python.flake8.reportPaths"
101-
SONAR_PYTHON_RUFF_REPORT_PATHS = "sonar.python.ruff.reportPaths"
96+
SONAR_PYTHON_XUNIT_REPORT_PATH: Key = "sonar.python.xunit.reportPath"
97+
SONAR_PYTHON_XUNIT_SKIP_DETAILS: Key = "sonar.python.xunit.skipDetails"
98+
SONAR_PYTHON_MYPY_REPORT_PATHS: Key = "sonar.python.mypy.reportPaths"
99+
SONAR_PYTHON_BANDIT_REPORT_PATHS: Key = "sonar.python.bandit.reportPaths"
100+
SONAR_PYTHON_FLAKE8_REPORT_PATHS: Key = "sonar.python.flake8.reportPaths"
101+
SONAR_PYTHON_RUFF_REPORT_PATHS: Key = "sonar.python.ruff.reportPaths"
102102
TOML_PATH: Key = "toml-path"
103103

104104
# ============ DEPRECATED ==============
105-
SONAR_SCANNER_OPTS = "sonar.scanner.opts"
105+
SONAR_SCANNER_OPTS: Key = "sonar.scanner.opts"
106106

107107

108108
@dataclass
@@ -116,8 +116,6 @@ class Property:
116116
cli_getter: Optional[Callable[[argparse.Namespace], Any]] = None
117117
"""function to get the value from the CLI arguments namespace. If None, the property is not settable via CLI"""
118118

119-
deprecated: bool = False
120-
121119
deprecation_message: Optional[str] = None
122120

123121
def python_name(self) -> str:
@@ -536,7 +534,6 @@ def env_variable_name(self) -> str:
536534
name=SONAR_SCANNER_OPTS,
537535
default_value=None,
538536
cli_getter=None,
539-
deprecated=True,
540537
deprecation_message="SONAR_SCANNER_OPTS is deprecated, please use SONAR_SCANNER_JAVA_OPTS instead."
541538
)
542539
]

0 commit comments

Comments
 (0)