Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: combine renovate[bot] PRs #1057

Merged
merged 11 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -176,7 +176,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.36.0</version>
<version>2.38.0</version>
<configuration>
<java>
<includes>
Expand Down Expand Up @@ -212,7 +212,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
8 changes: 4 additions & 4 deletions sorald-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<configuration>
<archive>
<manifest>
Expand Down Expand Up @@ -144,7 +144,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0</version>
<version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -181,7 +181,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.36.0</version>
<version>2.38.0</version>
<configuration>
<java>
<includes>
Expand Down Expand Up @@ -217,7 +217,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
4 changes: 1 addition & 3 deletions sorald-api/src/main/java/sorald/api/ProcessorRepository.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package sorald.api;

import sorald.processor.SoraldAbstractProcessor;

import java.util.List;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import sorald.processor.SoraldAbstractProcessor;

/**
* This interfaces describes a repository of processors. Each processor is a class that implements
Expand Down
6 changes: 2 additions & 4 deletions sorald-api/src/main/java/sorald/api/RuleRepository.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package sorald.api;

import sorald.rule.IRuleType;
import sorald.rule.Rule;

import java.util.Collection;

import javax.annotation.Nonnull;
import sorald.rule.IRuleType;
import sorald.rule.Rule;

/**
* This class defines the interface for a repository of rules. It is used by Sorald to find all
Expand Down
5 changes: 2 additions & 3 deletions sorald-api/src/main/java/sorald/event/models/CrashEvent.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package sorald.event.models;

import sorald.event.EventType;
import sorald.event.SoraldEvent;

import java.io.PrintWriter;
import java.io.StringWriter;
import sorald.event.EventType;
import sorald.event.SoraldEvent;

/** Event recording a crash. */
public class CrashEvent implements SoraldEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import sorald.event.EventType;
import sorald.event.SoraldEvent;
import sorald.rule.RuleViolation;

import spoon.reflect.declaration.CtElement;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
package sorald.processor;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import sorald.annotations.IncompleteProcessor;
import sorald.annotations.ProcessorAnnotation;
import sorald.event.EventHelper;
import sorald.event.SoraldEventHandler;
import sorald.event.models.CrashEvent;
import sorald.event.models.RepairEvent;
import sorald.rule.RuleViolation;

import spoon.processing.AbstractProcessor;
import spoon.reflect.declaration.CtElement;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;

/** superclass for all processors */
public abstract class SoraldAbstractProcessor<E extends CtElement> extends AbstractProcessor<E> {
private int maxFixes = Integer.MAX_VALUE;
Expand Down
3 changes: 1 addition & 2 deletions sorald-api/src/main/java/sorald/rule/RuleViolation.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package sorald.rule;

import sorald.Constants;

import java.nio.file.Path;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import sorald.Constants;

/** Representation of a violation of some Sonar rule */
public abstract class RuleViolation implements Comparable<RuleViolation> {
Expand Down
3 changes: 1 addition & 2 deletions sorald-api/src/main/java/sorald/rule/StaticAnalyzer.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package sorald.rule;

import sorald.cli.CLIConfigForStaticAnalyzer;

import java.io.File;
import java.util.Collection;
import java.util.List;
import sorald.cli.CLIConfigForStaticAnalyzer;

/** A static analyzer for Java source code */
public interface StaticAnalyzer {
Expand Down
8 changes: 4 additions & 4 deletions sorald/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.8.1</version>
<version>3.9.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -180,7 +180,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<configuration>
<archive>
<manifest>
Expand Down Expand Up @@ -280,7 +280,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.36.0</version>
<version>2.38.0</version>
<configuration>
<java>
<includes>
Expand Down Expand Up @@ -348,7 +348,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
6 changes: 2 additions & 4 deletions sorald/src/main/java/sorald/CodeGenerator.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package sorald;

import sorald.sonar.ProcessorsClassGenerator;

import spoon.Launcher;

import java.nio.file.Path;
import java.nio.file.Paths;
import sorald.sonar.ProcessorsClassGenerator;
import spoon.Launcher;

/** Wrapper class for all (present and future) code generation in Sorald. */
public class CodeGenerator {
Expand Down
5 changes: 2 additions & 3 deletions sorald/src/main/java/sorald/FileUtils.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package sorald;

import org.json.JSONArray;
import org.json.JSONObject;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
Expand All @@ -13,6 +10,8 @@
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.json.JSONArray;
import org.json.JSONObject;

public class FileUtils {
private FileUtils() {}
Expand Down
5 changes: 2 additions & 3 deletions sorald/src/main/java/sorald/Processors.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package sorald;

import sorald.api.ProcessorRepository;
import sorald.processor.SoraldAbstractProcessor;

import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.ServiceLoader;
import java.util.stream.Collectors;
import sorald.api.ProcessorRepository;
import sorald.processor.SoraldAbstractProcessor;

public class Processors {
private Processors() {}
Expand Down
38 changes: 18 additions & 20 deletions sorald/src/main/java/sorald/Repair.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
package sorald;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import sorald.event.EventHelper;
import sorald.event.EventType;
import sorald.event.SoraldEventHandler;
Expand All @@ -11,7 +29,6 @@
import sorald.segment.Node;
import sorald.segment.SoraldTreeBuilderAlgorithm;
import sorald.sonar.BestFitScanner;

import spoon.Launcher;
import spoon.MavenLauncher;
import spoon.compiler.Environment;
Expand All @@ -31,25 +48,6 @@
import spoon.support.QueueProcessingManager;
import spoon.support.sniper.SniperJavaPrettyPrinter;

import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/** Class for repairing projects. */
public class Repair {
private final SoraldConfig config;
Expand Down
9 changes: 4 additions & 5 deletions sorald/src/main/java/sorald/SelectiveForceImport.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package sorald;

import spoon.reflect.path.CtRole;
import spoon.reflect.reference.CtTypeReference;
import spoon.reflect.visitor.ForceImportProcessor;
import spoon.reflect.visitor.LexicalScope;

import java.util.Collection;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Set;
import spoon.reflect.path.CtRole;
import spoon.reflect.reference.CtTypeReference;
import spoon.reflect.visitor.ForceImportProcessor;
import spoon.reflect.visitor.LexicalScope;

/**
* Processor that force-imports type references only if they are not present in the excluded
Expand Down
5 changes: 2 additions & 3 deletions sorald/src/main/java/sorald/SoraldConfig.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package sorald;

import sorald.cli.CLIConfigForStaticAnalyzer;
import sorald.rule.Rule;

import java.io.File;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import sorald.cli.CLIConfigForStaticAnalyzer;
import sorald.rule.Rule;

/* All config settings of Sorald should be gathered here */
public class SoraldConfig implements CLIConfigForStaticAnalyzer {
Expand Down
15 changes: 6 additions & 9 deletions sorald/src/main/java/sorald/cli/BaseCommand.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
package sorald.cli;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.configurator.BasicComponentConfigurator;
import org.codehaus.plexus.component.configurator.ComponentConfigurator;
import org.codehaus.plexus.component.configurator.converters.basic.AbstractBasicConverter;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;

import picocli.CommandLine;

import sorald.Constants;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;

/** Base command containing the options in common for all Sorald subcommands. */
@CommandLine.Command()
abstract class BaseCommand extends AbstractMojo implements Callable<Integer> {
Expand Down
3 changes: 1 addition & 2 deletions sorald/src/main/java/sorald/cli/Cli.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package sorald.cli;

import picocli.CommandLine;

import java.util.concurrent.Callable;
import picocli.CommandLine;

/** Class containing the CLI for Sorald. */
public class Cli {
Expand Down
Loading