Skip to content

Commit 67c15da

Browse files
committed
Drop the unused deprecated reach config fields
reach_disable_analysis_splitting and reach_lazy_mode were copied into CliConfig but never read. They are gone now, the same as the new --reach-enable-analysis-splitting no-op. The argparse definitions stay, so all three flags still parse. The hidden-flag test now covers --reach-lazy-mode too.
1 parent 42bbbed commit 67c15da

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎socketsecurity/config.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ class CliConfig:
228228
reach_analysis_memory_limit: Optional[str] = None
229229
reach_analysis_timeout: Optional[str] = None
230230
reach_disable_analytics: bool = False
231-
reach_disable_analysis_splitting: bool = False # Deprecated, kept for backwards compatibility
232231
reach_detailed_analysis_log_file: bool = False
233-
reach_lazy_mode: bool = False # Deprecated, kept for backwards compatibility
234232
reach_ecosystems: Optional[List[str]] = None
235233
reach_exclude_paths: Optional[List[str]] = None
236234
reach_skip_cache: bool = False
@@ -397,9 +395,7 @@ def _from_args(cls, args_list: Optional[List[str]] = None) -> 'CliConfig':
397395
'reach_analysis_timeout': args.reach_analysis_timeout,
398396
'reach_analysis_memory_limit': args.reach_analysis_memory_limit,
399397
'reach_disable_analytics': args.reach_disable_analytics,
400-
'reach_disable_analysis_splitting': args.reach_disable_analysis_splitting,
401398
'reach_detailed_analysis_log_file': args.reach_detailed_analysis_log_file,
402-
'reach_lazy_mode': args.reach_lazy_mode,
403399
'reach_ecosystems': args.reach_ecosystems.split(',') if args.reach_ecosystems else None,
404400
'reach_exclude_paths': args.reach_exclude_paths.split(',') if args.reach_exclude_paths else None,
405401
'exclude_paths': normalize_exclude_paths(args.exclude_paths),

‎tests/unit/test_config.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,14 @@ def test_reach_disable_external_tool_checks_flag(self):
301301
assert config.reach_disable_external_tool_checks is True
302302

303303
@pytest.mark.parametrize(
304-
"flag", ["--reach-enable-analysis-splitting", "--reach-disable-analysis-splitting"]
304+
"flag",
305+
[
306+
"--reach-enable-analysis-splitting",
307+
"--reach-disable-analysis-splitting",
308+
"--reach-lazy-mode",
309+
],
305310
)
306-
def test_analysis_splitting_flags_are_accepted_and_hidden(self, flag, capsys):
311+
def test_deprecated_reach_flags_are_accepted_and_hidden(self, flag, capsys):
307312
CliConfig.from_args(self.BASE_ARGS + ["--reach", flag])
308313
with pytest.raises(SystemExit):
309314
CliConfig.from_args(["--help"])

0 commit comments

Comments
 (0)