Skip to content

Commit 5ab3ae6

Browse files
committed
fix: Fix lint warnings
1 parent bb51b6a commit 5ab3ae6

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

plugin/src/main/java/io/snyk/eclipse/plugin/html/BaseHtmlProvider.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,37 +98,37 @@ public String replaceCssVariables(String html) {
9898
// Build the CSS with the nonce
9999
String nonce = getNonce();
100100
String css = "<style nonce=\"" + nonce + "\">" + getCss() + "</style>";
101-
html = html.replace("${ideStyle}", css);
102-
html = html.replace("<style nonce=\"ideNonce\" data-ide-style></style>", css);
103-
html = html.replace("var(--default-font)",
101+
String htmlStyled = html.replace("${ideStyle}", css);
102+
htmlStyled = htmlStyled.replace("<style nonce=\"ideNonce\" data-ide-style></style>", css);
103+
htmlStyled = htmlStyled.replace("var(--default-font)",
104104
" ui-sans-serif, \"SF Pro Text\", \"Segoe UI\", \"Ubuntu\", Tahoma, Geneva, Verdana, sans-serif;");
105105

106106
// Replace CSS variables with actual color values
107-
html = html.replace("var(--text-color)",
107+
htmlStyled = htmlStyled.replace("var(--text-color)",
108108
getColorAsHex("org.eclipse.ui.workbench.ACTIVE_TAB_TEXT_COLOR", "#000000"));
109109

110-
html = html.replace("var(--ide-background-color)",
110+
htmlStyled = htmlStyled.replace("var(--ide-background-color)",
111111
getColorAsHex("org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_BG_START", "#FFFFFF"));
112-
html = html.replace("var(--background-color)",
112+
htmlStyled = htmlStyled.replace("var(--background-color)",
113113
getColorAsHex("org.eclipse.ui.workbench.ACTIVE_TAB_BG_END", "#FFFFFF"));
114-
html = html.replace("var(--code-background-color)",
114+
htmlStyled = htmlStyled.replace("var(--code-background-color)",
115115
getColorAsHex("org.eclipse.ui.workbench.INACTIVE_TAB_BG_START", "#F0F0F0"));
116-
html = html.replace("var(--button-color)",
116+
htmlStyled = htmlStyled.replace("var(--button-color)",
117117
getColorAsHex("org.eclipse.ui.workbench.INACTIVE_TAB_BG_START", "#F0F0F0"));
118-
html = html.replace("var(--circle-color)",
118+
htmlStyled = htmlStyled.replace("var(--circle-color)",
119119
getColorAsHex("org.eclipse.ui.workbench.INACTIVE_TAB_BG_START", "#F0F0F0"));
120120

121-
html = html.replace("var(--border-color)",
121+
htmlStyled = htmlStyled.replace("var(--border-color)",
122122
getColorAsHex("org.eclipse.ui.workbench.ACTIVE_TAB_OUTER_KEYLINE_COLOR", "#CCCCCC"));
123-
html = html.replace("var(--link-color)", getColorAsHex("ACTIVE_HYPERLINK_COLOR", "#0000FF"));
124-
html = html.replace("var(--horizontal-border-color)",
123+
htmlStyled = htmlStyled.replace("var(--link-color)", getColorAsHex("ACTIVE_HYPERLINK_COLOR", "#0000FF"));
124+
htmlStyled = htmlStyled.replace("var(--horizontal-border-color)",
125125
getColorAsHex("org.eclipse.ui.workbench.ACTIVE_TAB_OUTER_KEYLINE_COLOR", "#CCCCCC"));
126126

127-
html = html.replace("${headerEnd}", "");
128-
html = html.replace("${nonce}", nonce);
129-
html = html.replace("ideNonce", nonce);
127+
htmlStyled = htmlStyled.replace("${headerEnd}", "");
128+
htmlStyled = htmlStyled.replace("${nonce}", nonce);
129+
htmlStyled = htmlStyled.replace("ideNonce", nonce);
130130

131-
return html;
131+
return htmlStyled;
132132
}
133133

134134
public String getColorAsHex(String colorKey, String defaultColor) {

plugin/src/main/java/io/snyk/eclipse/plugin/html/StaticPageHtmlProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public String getSummaryInitHtml() {
178178
}
179179

180180
public String getFormattedSummaryHtml(String summary) {
181-
summary = summary.replace("${ideFunc}", "window.enableDelta(isEnabled);");
182-
return replaceCssVariables(summary);
181+
String summaryWithFunc = summary.replace("${ideFunc}", "window.enableDelta(isEnabled);");
182+
return replaceCssVariables(summaryWithFunc);
183183
}
184184
}

0 commit comments

Comments
 (0)