Skip to content

Commit

Permalink
Drop templated check support, including checks CommentRegularExpressi…
Browse files Browse the repository at this point in the history
…onCheck and XPathCheck
  • Loading branch information
StevenLooman committed Sep 11, 2023
1 parent ccbe2fc commit 43fcc05
Show file tree
Hide file tree
Showing 18 changed files with 3 additions and 359 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- Move functionality from implementation provider to definition provider in magik-language-server.
- Implementation provider now provides impementations of abstract methods.
- Add SelectionRangeProvider to magik-language-server.
- Drop templated check support, including checks CommentRegularExpressionCheck and XPathCheck.
- Various small fixes.

0.7.1 (2023-02-21)
Expand Down
4 changes: 0 additions & 4 deletions magik-checks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
<groupId>org.sonarsource.sonarqube</groupId>
<artifactId>sonar-check-api</artifactId>
</dependency>
<dependency>
<groupId>org.sonarsource.sslr</groupId>
<artifactId>sslr-xpath</artifactId>
</dependency>

<dependency>
<groupId>org.json</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import nl.ramsolutions.sw.magik.checks.checks.CommentRegularExpressionCheck;
import nl.ramsolutions.sw.magik.checks.checks.CommentedCodeCheck;
import nl.ramsolutions.sw.magik.checks.checks.DuplicateMethodInFileCheck;
import nl.ramsolutions.sw.magik.checks.checks.EmptyBlockCheck;
Expand Down Expand Up @@ -38,7 +37,6 @@
import nl.ramsolutions.sw.magik.checks.checks.VariableDeclarationUsageDistanceCheck;
import nl.ramsolutions.sw.magik.checks.checks.VariableNamingCheck;
import nl.ramsolutions.sw.magik.checks.checks.WarnedCallCheck;
import nl.ramsolutions.sw.magik.checks.checks.XPathCheck;

/**
* Check list.
Expand All @@ -63,7 +61,6 @@ private CheckList() {
*/
public static List<Class<?>> getChecks() {
return List.of(
CommentRegularExpressionCheck.class,
CommentedCodeCheck.class,
DuplicateMethodInFileCheck.class,
EmptyBlockCheck.class,
Expand Down Expand Up @@ -97,8 +94,7 @@ public static List<Class<?>> getChecks() {
VariableCountCheck.class,
VariableDeclarationUsageDistanceCheck.class,
VariableNamingCheck.class,
WarnedCallCheck.class,
XPathCheck.class);
WarnedCallCheck.class);
}

/**
Expand All @@ -119,14 +115,4 @@ public static List<Class<?>> getDisabledByDefaultChecks() {
.collect(Collectors.toList());
}

/**
* Get {@link MagikCheck}s which are templated.
* @return List of {@link MagikCheck}s.
*/
public static List<Class<?>> getTemplatedChecks() {
return getChecks().stream()
.filter(checkClass -> checkClass.getAnnotation(TemplatedMagikCheck.class) != null)
.collect(Collectors.toList());
}

}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@
import nl.ramsolutions.sw.magik.analysis.typing.types.UndefinedType;
import nl.ramsolutions.sw.magik.api.MagikGrammar;
import org.eclipse.lsp4j.ServerCapabilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Implementation provider.
*/
public class ImplementationProvider {

private static final Logger LOGGER = LoggerFactory.getLogger(ImplementationProvider.class);

/**
* Set server capabilities.
* @param capabilities Server capabilities.
Expand Down
Loading

0 comments on commit 43fcc05

Please sign in to comment.