-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d3745b
commit 7acbe7d
Showing
11 changed files
with
356 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,48 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.snyk</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>3.0.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.snyk</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>3.0.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>io.snyk.scanner</artifactId> | ||
<artifactId>io.snyk.scanner</artifactId> | ||
<properties> | ||
<pmdRuleDir>${project.parent.basedir}</pmdRuleDir> | ||
</properties> | ||
|
||
<packaging>eclipse-feature</packaging> | ||
<packaging>eclipse-feature</packaging> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-source-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<executions> | ||
<execution> | ||
<id>feature-source</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>feature-source</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-p2-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-p2-metadata</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>p2-metadata</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-source-plugin</artifactId> | ||
<version>${tycho-version}</version> | ||
<executions> | ||
<execution> | ||
<id>feature-source</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>feature-source</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.eclipse.tycho</groupId> | ||
<artifactId>tycho-p2-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>attach-p2-metadata</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>p2-metadata</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 16 additions & 18 deletions
34
plugin/src/main/java/io/snyk/eclipse/plugin/html/OssHtmlProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
package io.snyk.eclipse.plugin.html; | ||
|
||
public class OssHtmlProvider extends BaseHtmlProvider { | ||
private static OssHtmlProvider instance = new OssHtmlProvider(); | ||
private static OssHtmlProvider instance = new OssHtmlProvider(); | ||
|
||
public static OssHtmlProvider getInstance() { | ||
synchronized (OssHtmlProvider.class) { | ||
if (instance == null) { | ||
if (instance == null) { | ||
instance = new OssHtmlProvider(); | ||
} | ||
} | ||
} | ||
return instance; | ||
} | ||
public static OssHtmlProvider getInstance() { | ||
synchronized (OssHtmlProvider.class) { | ||
if (instance == null) { | ||
instance = new OssHtmlProvider(); | ||
} | ||
} | ||
return instance; | ||
} | ||
|
||
@Override | ||
public String replaceCssVariables(String html) { | ||
html = super.replaceCssVariables(html); | ||
html = html.replace("var(--container-background-color)", | ||
super.getColorAsHex("org.eclipse.ui.workbench.DARK_BACKGROUND", "#F0F0F0")); | ||
return html; | ||
} | ||
@Override | ||
public String replaceCssVariables(String html) { | ||
html = super.replaceCssVariables(html); | ||
html = html.replace("var(--container-background-color)", | ||
super.getColorAsHex("org.eclipse.ui.workbench.DARK_BACKGROUND", "#F0F0F0")); | ||
return html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Custom Rules" | ||
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> | ||
|
||
<description>Sensible PMD rules focusing on important code quality issues</description> | ||
|
||
<!-- Error Prone - Critical issues that are likely bugs --> | ||
<rule ref="category/java/errorprone.xml"> | ||
<exclude name="BeanMembersShouldSerialize"/> | ||
</rule> | ||
|
||
<!-- Best Practices - Important coding standards --> | ||
<rule ref="category/java/bestpractices.xml"> | ||
<exclude name="GuardLogStatement"/> | ||
<exclude name="JUnitTestsShouldIncludeAssert"/> | ||
</rule> | ||
|
||
<!-- Performance - Critical performance issues --> | ||
<rule ref="category/java/performance.xml"/> | ||
|
||
<!-- Security - Basic security checks --> | ||
<rule ref="category/java/security.xml"/> | ||
|
||
<!-- Exclude generated sources --> | ||
<exclude-pattern>.*/generated/.*</exclude-pattern> | ||
<exclude-pattern>.*/target/.*</exclude-pattern> | ||
</ruleset> |
Oops, something went wrong.