Skip to content

feat: add riskScoreThreshold support to settings#346

Merged
bastiandoetsch merged 2 commits intomainfrom
feat/add-risk-score-threshold
Dec 18, 2025
Merged

feat: add riskScoreThreshold support to settings#346
bastiandoetsch merged 2 commits intomainfrom
feat/add-risk-score-threshold

Conversation

@bastiandoetsch
Copy link
Copy Markdown
Contributor

Summary

Add riskScoreThreshold field to enable filtering issues by risk score. This fixes the same issue that was identified in the IntelliJ plugin where the riskScoreThreshold value was being lost.

Root Cause

The riskScoreThreshold field was completely missing from the Eclipse plugin:

Location Issue
Preferences.java No RISK_SCORE_THRESHOLD constant
Settings.java No riskScoreThreshold field
LsConfigurationUpdater.java No handling in getCurrentSettings()
HTMLSettingsPreferencePage.java No handling in parseAndSaveConfig()

Changes

  • Add RISK_SCORE_THRESHOLD constant to Preferences.java
  • Add riskScoreThreshold field to Settings.java
  • Update LsConfigurationUpdater to read and include riskScoreThreshold
  • Handle riskScoreThreshold in HTMLSettingsPreferencePage.parseAndSaveConfig()
  • Add tests for riskScoreThreshold handling

Data Flow (Fixed)

  1. User enters 200 → JS collects {riskScoreThreshold: 200}
  2. JS calls __saveIdeConfig__ → Eclipse receives JSON ✓
  3. HTMLSettingsPreferencePage.parseAndSaveConfig() → stores to Preferences
  4. Eclipse calls updateConfiguration()LsConfigurationUpdater.getCurrentSettings()
  5. Settings includes riskScoreThreshold → sent to LS ✓
  6. User reopens dialog → LS returns settings with riskScoreThreshold

Add riskScoreThreshold field to enable filtering issues by risk score.
This fixes the same issue that was identified in the IntelliJ plugin
where the riskScoreThreshold value was being lost.

Changes:
- Add RISK_SCORE_THRESHOLD constant to Preferences.java
- Add riskScoreThreshold field to Settings.java
- Update LsConfigurationUpdater to read and include riskScoreThreshold
- Handle riskScoreThreshold in HTMLSettingsPreferencePage.parseAndSaveConfig()
- Add tests for riskScoreThreshold handling
@bastiandoetsch bastiandoetsch requested review from a team as code owners December 18, 2025 09:56
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 18, 2025

CLA assistant check
All committers have signed the CLA.

@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Dec 18, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Comment on lines +75 to +77
} catch (NumberFormatException e) {
// ignore, keep null
}

Check warning

Code scanning / PMD

Avoid empty catch blocks Warning

Avoid empty catch blocks
@bastiandoetsch bastiandoetsch merged commit 85eaabb into main Dec 18, 2025
10 of 16 checks passed
@bastiandoetsch bastiandoetsch deleted the feat/add-risk-score-threshold branch December 18, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants