]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9601 Read analysis incremental flag and file status from report
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 24 Jul 2017 14:09:49 +0000 (16:09 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Mon, 7 Aug 2017 09:44:06 +0000 (11:44 +0200)
17 files changed:
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/analysis/AnalysisMetadataHolder.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/analysis/AnalysisMetadataHolderImpl.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/analysis/MutableAnalysisMetadataHolder.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/component/Component.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/component/ComponentImpl.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/component/ComponentRootBuilder.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/step/ValidateProjectStep.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/analysis/AnalysisMetadataHolderImplTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/analysis/AnalysisMetadataHolderRule.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/analysis/MutableAnalysisMetadataHolderRule.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/component/ComponentImplTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/component/ReportComponent.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/component/ViewsComponent.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/BuildComponentTreeStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/LoadReportAnalysisMetadataHolderStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/step/ValidateProjectStepTest.java

index 2338a6bd55facf3938f266483078372fae4e6506..16840e230f1d1fdb3661fd1e050776597c1b6488 100644 (file)
@@ -53,6 +53,11 @@ public interface AnalysisMetadataHolder {
    * @throws IllegalStateException if baseProjectSnapshot has not been set
    */
   boolean isFirstAnalysis();
+  
+  /**
+   * Whether this is an incremental analysis or a full analysis.
+   */
+  boolean isIncrementalAnalysis();
 
   /**
    * Return the last analysis of the project.
index 0ddc18542f1dedc0f8d58732b59d632ae4e2f31d..a5b3128a0aafd7e9cded8389cbc20a87237e2dde 100644 (file)
@@ -34,6 +34,7 @@ public class AnalysisMetadataHolderImpl implements MutableAnalysisMetadataHolder
   private final InitializedProperty<Organization> organization = new InitializedProperty<>();
   private final InitializedProperty<String> uuid = new InitializedProperty<>();
   private final InitializedProperty<Long> analysisDate = new InitializedProperty<>();
+  private final InitializedProperty<Boolean> incrementalAnalysis = new InitializedProperty<>();
   private final InitializedProperty<Analysis> baseProjectSnapshot = new InitializedProperty<>();
   private final InitializedProperty<Boolean> crossProjectDuplicationEnabled = new InitializedProperty<>();
   private final InitializedProperty<String> branch = new InitializedProperty<>();
@@ -91,6 +92,19 @@ public class AnalysisMetadataHolderImpl implements MutableAnalysisMetadataHolder
     return getBaseAnalysis() == null;
   }
 
+  @Override
+  public MutableAnalysisMetadataHolder setIncrementalAnalysis(boolean isIncrementalAnalysis) {
+    checkState(!incrementalAnalysis.isInitialized(), "Incremental analysis flag has already been set");
+    this.incrementalAnalysis.setProperty(isIncrementalAnalysis);
+    return this;
+  }
+
+  @Override
+  public boolean isIncrementalAnalysis() {
+    checkState(incrementalAnalysis.isInitialized(), "Incremental analysis flag has not been set");
+    return this.incrementalAnalysis.getProperty();
+  }
+
   @Override
   public MutableAnalysisMetadataHolder setBaseAnalysis(@Nullable Analysis baseAnalysis) {
     checkState(!this.baseProjectSnapshot.isInitialized(), "Base project snapshot has already been set");
index 3032d536b2e6406e8aa4eaa8233a4eb286d3d24a..b72db65691660696f52b9f6667e07a7b456003e5 100644 (file)
@@ -40,6 +40,11 @@ public interface MutableAnalysisMetadataHolder extends AnalysisMetadataHolder {
    */
   MutableAnalysisMetadataHolder setAnalysisDate(long date);
 
+  /**
+   * @throws IllegalStateException if it has already been set
+   */
+  MutableAnalysisMetadataHolder setIncrementalAnalysis(boolean isIncrementalAnalysis);
+  
   /**
    * @throws IllegalStateException if baseAnalysis has already been set
    */
index 89481723f5fafc03fd3882e607cd573d65d6aa49..0d2b65169d0e309e13a3ced95129a7b99360cc20 100644 (file)
@@ -58,8 +58,14 @@ public interface Component {
     }
   }
 
+  enum Status {
+    UNAVAILABLE, SAME, CHANGED, ADDED;
+  }
+
   Type getType();
 
+  Status getStatus();
+
   /**
    * Returns the component uuid
    */
index 490ed4e534519b7f1c0310966f51a4fd568528df..e7686fa9d2ff1087f6c687cea640a279e8f65c15 100644 (file)
@@ -35,6 +35,7 @@ import static org.apache.commons.lang.StringUtils.trimToNull;
 @Immutable
 public class ComponentImpl implements Component {
   private final Type type;
+  private final Status status;
   private final String name;
   private final String key;
   private final String uuid;
@@ -49,6 +50,7 @@ public class ComponentImpl implements Component {
 
   private ComponentImpl(Builder builder) {
     this.type = builder.type;
+    this.status = builder.status;
     this.key = builder.key;
     this.name = builder.name;
     this.description = builder.description;
@@ -62,6 +64,11 @@ public class ComponentImpl implements Component {
   public Type getType() {
     return type;
   }
+  
+  @Override
+  public Status getStatus() {
+    return status;
+  }
 
   @Override
   public String getUuid() {
@@ -125,8 +132,10 @@ public class ComponentImpl implements Component {
     private static final String UUID_CANNOT_BE_NULL = "uuid can't be null";
     private static final String REPORT_ATTRIBUTES_CANNOT_BE_NULL = "reportAttributes can't be null";
     private static final String NAME_CANNOT_BE_NULL = "name can't be null";
-
+    private static final String STATUS_CANNOT_BE_NULL = "status can't be null";
+    
     private final Type type;
+    private Status status;
     private ReportAttributes reportAttributes;
     private String uuid;
     private String key;
@@ -153,6 +162,11 @@ public class ComponentImpl implements Component {
     public String getUuid() {
       return uuid;
     }
+    
+    public Builder setStatus(Status status) {
+      this.status = requireNonNull(status, STATUS_CANNOT_BE_NULL);
+      return this;
+    }
 
     public Builder setKey(String s) {
       this.key = requireNonNull(s, KEY_CANNOT_BE_NULL);
@@ -187,6 +201,7 @@ public class ComponentImpl implements Component {
       requireNonNull(uuid, UUID_CANNOT_BE_NULL);
       requireNonNull(key, KEY_CANNOT_BE_NULL);
       requireNonNull(name, NAME_CANNOT_BE_NULL);
+      requireNonNull(status, STATUS_CANNOT_BE_NULL);
       return new ComponentImpl(this);
     }
   }
index ab731524c0286dfc72ff4a5766e761d6248c6e9d..75a964a0e405dbc76a6c174a8bd30e68487f2050 100644 (file)
@@ -125,6 +125,7 @@ public class ComponentRootBuilder {
     return ComponentImpl.builder(convertType(reportComponent.getType()))
       .setUuid(uuidSupplier.apply(componentKey))
       .setKey(componentKey)
+      .setStatus(convertStatus(reportComponent.getStatus()))
       .setDescription(trimToNull(reportComponent.getDescription()))
       .setFileAttributes(createFileAttributes(reportComponent))
       .addChildren(toArray(buildChildren(reportComponent, latestModuleKey), Component.class));
@@ -197,6 +198,22 @@ public class ComponentRootBuilder {
       component.getLines());
   }
 
+  static Component.Status convertStatus(ScannerReport.Component.FileStatus status) {
+    switch(status) {
+      case ADDED:
+        return Component.Status.ADDED;
+      case SAME:
+        return Component.Status.SAME;
+      case CHANGED:
+        return Component.Status.CHANGED;
+      case UNAVAILABLE:
+        return Component.Status.UNAVAILABLE;
+      case UNRECOGNIZED:
+      default:
+        throw new IllegalArgumentException("Unsupported ComponentType value " + status);
+    }
+  }
+
   @VisibleForTesting
   static Component.Type convertType(ScannerReport.Component.ComponentType type) {
     switch (type) {
index 5898ef8b095d5e405d152465ad80c401c584d9a9..f4cff3f6738864d119397a1240508aa43324a804 100644 (file)
@@ -95,6 +95,7 @@ public class LoadReportAnalysisMetadataHolderStep implements ComputationStep {
     mutableAnalysisMetadataHolder.setRootComponentRef(reportMetadata.getRootComponentRef());
     mutableAnalysisMetadataHolder.setBranch(isNotEmpty(reportMetadata.getBranch()) ? reportMetadata.getBranch() : null);
     mutableAnalysisMetadataHolder.setCrossProjectDuplicationEnabled(reportMetadata.getCrossProjectDuplicationActivated());
+    mutableAnalysisMetadataHolder.setIncrementalAnalysis(reportMetadata.getIncremental());
     mutableAnalysisMetadataHolder.setQProfilesByLanguage(transformValues(reportMetadata.getQprofilesPerLanguage(), TO_COMPUTE_QPROFILE));
     mutableAnalysisMetadataHolder.setOrganization(organization);
   }
index 6c7ff308160c800ba42535af82e944a589be5656..0eb52d2aa9bc4febd3d8f4f873bdd425ad5f0ec9 100644 (file)
@@ -115,6 +115,7 @@ public class ValidateProjectStep implements ComputationStep {
       this.rawProject = rawProject;
       String rawProjectKey = rawProject.getKey();
       validateBranch();
+      validateNotIncrementalAndFirstAnalysis(rawProjectKey);
       validateBatchKey(rawProject);
 
       Optional<ComponentDto> baseProject = loadBaseComponent(rawProjectKey);
@@ -132,6 +133,13 @@ public class ValidateProjectStep implements ComputationStep {
       }
     }
 
+    private void validateNotIncrementalAndFirstAnalysis(String rawProjectKey) {
+      if (analysisMetadataHolder.isIncrementalAnalysis() && analysisMetadataHolder.isFirstAnalysis()) {
+        validationMessages.add(format("The project \"%s\" hasn't been analysed before and the first analysis can't be incremental."
+          + " Please launch a full analysis of the project.", rawProjectKey));
+      }
+    }
+
     private void validateProjectKey(Optional<ComponentDto> baseProject, String rawProjectKey) {
       if (baseProject.isPresent() && !baseProject.get().projectUuid().equals(baseProject.get().uuid())) {
         // Project key is already used as a module of another project
index 4cb9539c18fd68a9870dfcc5ff43bd2edb9dad02..707acbeaffbf0481d997b2ea4f3439b2dcfe3374 100644 (file)
@@ -199,7 +199,7 @@ public class AnalysisMetadataHolderImplTest {
 
     new AnalysisMetadataHolderImpl().isCrossProjectDuplicationEnabled();
   }
-
+  
   @Test
   public void setIsCrossProjectDuplicationEnabled_throws_ISE_when_called_twice() {
     AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl();
@@ -210,6 +210,52 @@ public class AnalysisMetadataHolderImplTest {
     underTest.setCrossProjectDuplicationEnabled(false);
   }
 
+  @Test
+  public void setIsIncrementalAnalysis_throws_ISE_when_called_twice() {
+    AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl();
+    underTest.setIncrementalAnalysis(true);
+
+    expectedException.expect(IllegalStateException.class);
+    expectedException.expectMessage("Incremental analysis flag has already been set");
+    underTest.setIncrementalAnalysis(false);
+  }
+  
+  @Test
+  public void isIncrementalAnalysis_return_true() {
+    AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl();
+
+    underTest.setIncrementalAnalysis(true);
+
+    assertThat(underTest.isIncrementalAnalysis()).isEqualTo(true);
+  }
+
+  @Test
+  public void isIncrementalAnalysis_return_false() {
+    AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl();
+
+    underTest.setIncrementalAnalysis(false);
+
+    assertThat(underTest.isIncrementalAnalysis()).isEqualTo(false);
+  }
+
+  @Test
+  public void isIncrementalAnalysisEnabled_throws_ISE_when_holder_is_not_initialized() {
+    expectedException.expect(IllegalStateException.class);
+    expectedException.expectMessage("Incremental analysis flag has not been set");
+
+    new AnalysisMetadataHolderImpl().isIncrementalAnalysis();
+  }
+
+  @Test
+  public void setIsIncrementalAnalys_throws_ISE_when_called_twice() {
+    AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl();
+    underTest.setIncrementalAnalysis(true);
+
+    expectedException.expect(IllegalStateException.class);
+    expectedException.expectMessage("Incremental analysis flag has already been set");
+    underTest.setIncrementalAnalysis(false);
+  }
+
   @Test
   public void set_branch() {
     AnalysisMetadataHolderImpl underTest = new AnalysisMetadataHolderImpl();
index dc6e1da9fa6f62175338d206860735d35a2c9fcb..41a06d3f9ee1c5b4a7e42d6cb33c75043bcd3a52 100644 (file)
@@ -40,6 +40,8 @@ public class AnalysisMetadataHolderRule extends ExternalResource implements Muta
 
   private final InitializedProperty<Long> analysisDate = new InitializedProperty<>();
 
+  private final InitializedProperty<Boolean> incremental = new InitializedProperty<>();
+
   private final InitializedProperty<Analysis> baseAnalysis = new InitializedProperty<>();
 
   private final InitializedProperty<Boolean> crossProjectDuplicationEnabled = new InitializedProperty<>();
@@ -171,4 +173,16 @@ public class AnalysisMetadataHolderRule extends ExternalResource implements Muta
     checkState(qProfilesPerLanguage.isInitialized(), "QProfile per language has not been set");
     return qProfilesPerLanguage.getProperty();
   }
+
+  @Override
+  public boolean isIncrementalAnalysis() {
+    checkState(incremental.isInitialized(), "Incremental mode flag has not been set");
+    return incremental.getProperty();
+  }
+
+  @Override
+  public AnalysisMetadataHolderRule setIncrementalAnalysis(boolean isIncrementalAnalysis) {
+    this.incremental.setProperty(isIncrementalAnalysis);
+    return this;
+  }
 }
index 473fc706e019a248b1497e44a08c586e9dd80366..39bdf31b1f8b2376fad3395f15f839d869836db3 100644 (file)
@@ -129,4 +129,15 @@ public class MutableAnalysisMetadataHolderRule extends ExternalResource implemen
   public Map<String, QualityProfile> getQProfilesByLanguage() {
     return delegate.getQProfilesByLanguage();
   }
+
+  @Override
+  public boolean isIncrementalAnalysis() {
+    return delegate.isIncrementalAnalysis();
+  }
+
+  @Override
+  public MutableAnalysisMetadataHolder setIncrementalAnalysis(boolean isIncrementalAnalysis) {
+    delegate.setIncrementalAnalysis(isIncrementalAnalysis);
+    return this;
+  }
 }
index 1ef919a3185af190e41061f2266df3fb1397a4b7..df3d214802313c30e761c266c565b53f83c760e9 100644 (file)
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
+import org.sonar.server.computation.task.projectanalysis.component.Component.Status;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.fail;
@@ -53,6 +54,25 @@ public class ComponentImplTest {
     builder(null);
   }
 
+  @Test
+  public void builder_throws_NPE_if_status_arg_is_Null() {
+    thrown.expect(NullPointerException.class);
+
+    builder(FILE).setStatus(null);
+  }
+
+  @Test
+  public void builder_throws_NPE_if_status_is_Null() {
+    thrown.expect(NullPointerException.class);
+
+    builder(Component.Type.DIRECTORY)
+      .setName("DIR")
+      .setKey(KEY)
+      .setUuid(UUID)
+      .setReportAttributes(ReportAttributes.newBuilder(1).build())
+      .build();
+  }
+
   @Test
   public void set_key_throws_NPE_if_component_arg_is_Null() {
     thrown.expect(NullPointerException.class);
@@ -154,12 +174,14 @@ public class ComponentImplTest {
       .setName("CHILD_NAME")
       .setKey("CHILD_KEY")
       .setUuid("CHILD_UUID")
+      .setStatus(Status.UNAVAILABLE)
       .setReportAttributes(ReportAttributes.newBuilder(2).build())
       .build();
     ComponentImpl componentImpl = builder(Component.Type.DIRECTORY)
       .setName("DIR")
       .setKey(KEY)
       .setUuid(UUID)
+      .setStatus(Status.UNAVAILABLE)
       .setReportAttributes(ReportAttributes.newBuilder(1).build())
       .addChildren(child)
       .build();
@@ -193,6 +215,7 @@ public class ComponentImplTest {
     return builder(type)
       .setName("name_" + key)
       .setKey(key)
+      .setStatus(Status.UNAVAILABLE)
       .setUuid("uuid_" + key)
       .setReportAttributes(ReportAttributes.newBuilder(key.hashCode())
         .build());
index 7c90e551f5b92209762e14852de1e4d7f80d4539..f4f276798030c681b183b0ac28509d7a31e6e1c9 100644 (file)
@@ -40,6 +40,7 @@ public class ReportComponent implements Component {
   public static final Component DUMB_PROJECT = builder(Type.PROJECT, 1).setKey("PROJECT_KEY").setUuid("PROJECT_UUID").setName("Project Name").setVersion("1.0-SNAPSHOT").build();
 
   private final Type type;
+  private final Status status;
   private final String name;
   @CheckForNull
   private final String description;
@@ -51,6 +52,7 @@ public class ReportComponent implements Component {
 
   private ReportComponent(Builder builder) {
     this.type = builder.type;
+    this.status = builder.status;
     this.key = builder.key;
     this.name = builder.name == null ? String.valueOf(builder.key) : builder.name;
     this.description = builder.description;
@@ -67,6 +69,11 @@ public class ReportComponent implements Component {
   public Type getType() {
     return type;
   }
+  
+  @Override
+  public Status getStatus() {
+    return status;
+  }
 
   @Override
   public String getUuid() {
@@ -159,6 +166,7 @@ public class ReportComponent implements Component {
   public static final class Builder {
     private final Type type;
     private final int ref;
+    private Status status;
     private String uuid;
     private String key;
     private String name;
@@ -174,6 +182,11 @@ public class ReportComponent implements Component {
       this.ref = ref;
     }
 
+    public Builder setStatus(Status s) {
+      this.status = Objects.requireNonNull(s);
+      return this;
+    }
+
     public Builder setUuid(String s) {
       this.uuid = Objects.requireNonNull(s);
       return this;
@@ -222,4 +235,5 @@ public class ReportComponent implements Component {
       return new ReportComponent(this);
     }
   }
+
 }
index 9f9824dce02eb93cd58c37676d0ab517213fcf19..b9fbf9890251ce269d415c2f230917d351b95642 100644 (file)
@@ -136,6 +136,11 @@ public class ViewsComponent implements Component {
   public Type getType() {
     return type;
   }
+  
+  @Override
+  public Status getStatus() {
+    return Status.UNAVAILABLE;
+  }
 
   @Override
   public String getUuid() {
index 06bce8981c175f57d903cb42b907b96ba379c9ed..b949295806c703cfe390775f6d4c0de626f5d604 100644 (file)
@@ -36,6 +36,7 @@ import org.sonar.db.component.SnapshotDto;
 import org.sonar.db.organization.OrganizationDto;
 import org.sonar.scanner.protocol.output.ScannerReport;
 import org.sonar.scanner.protocol.output.ScannerReport.Component.ComponentType;
+import org.sonar.scanner.protocol.output.ScannerReport.Component.FileStatus;
 import org.sonar.server.computation.task.projectanalysis.analysis.AnalysisMetadataHolderImpl;
 import org.sonar.server.computation.task.projectanalysis.analysis.MutableAnalysisMetadataHolder;
 import org.sonar.server.computation.task.projectanalysis.analysis.MutableAnalysisMetadataHolderRule;
@@ -339,6 +340,7 @@ public class BuildComponentTreeStepTest {
     ScannerReport.Component.Builder builder = ScannerReport.Component.newBuilder()
       .setType(componentType)
       .setRef(componentRef)
+      .setStatus(FileStatus.UNAVAILABLE)
       .setLines(1);
     if (key != null) {
       builder.setKey(key);
index 1e0b1e246d50fba4f749b0215ec8cc13b278928c..3169ada19ed85f65e6c8a8e51489d68613306888 100644 (file)
@@ -147,6 +147,31 @@ public class LoadReportAnalysisMetadataHolderStepTest {
 
     assertThat(analysisMetadataHolder.isCrossProjectDuplicationEnabled()).isEqualTo(false);
   }
+  
+  @Test
+  public void set_incremental_analysis_to_true() {
+    reportReader.setMetadata(
+      newBatchReportBuilder()
+        .setIncremental(true)
+        .build());
+
+    underTest.execute();
+
+    assertThat(analysisMetadataHolder.isIncrementalAnalysis()).isTrue();
+  }
+  
+  @Test
+  public void set_incremental_analysis_to_false() {
+    reportReader.setMetadata(
+      newBatchReportBuilder()
+      .setIncremental(false)
+        .build());
+
+    underTest.execute();
+
+    assertThat(analysisMetadataHolder.isIncrementalAnalysis()).isFalse();
+  }
+
 
   @Test
   public void set_cross_project_duplication_to_false_when_nothing_in_the_report() {
index f1c0120b2913afd3d051de3e30538503ef21a8cd..499699b183e598bf74ff64e5c09505c39e567e93 100644 (file)
@@ -62,6 +62,7 @@ public class ValidateProjectStepTest {
   @Rule
   public AnalysisMetadataHolderRule analysisMetadataHolder = new AnalysisMetadataHolderRule()
     .setAnalysisDate(new Date(DEFAULT_ANALYSIS_TIME))
+    .setIncrementalAnalysis(false)
     .setBranch(DEFAULT_BRANCH);
 
   DbClient dbClient = dbTester.getDbClient();
@@ -290,4 +291,29 @@ public class ValidateProjectStepTest {
 
     underTest.execute();
   }
+  
+  @Test
+  public void fail_if_incremental_and_first_analysis() {
+    analysisMetadataHolder.setBaseAnalysis(null);
+    //setAnalysisDate(DateUtils.parseDate("2015-01-01"));
+
+    reportReader.putComponent(ScannerReport.Component.newBuilder()
+      .setRef(1)
+      .setType(ComponentType.PROJECT)
+      .setKey(PROJECT_KEY)
+      .addChildRef(2)
+      .build());
+
+    analysisMetadataHolder.setIncrementalAnalysis(true);
+    
+    //dbTester.getSession().commit();
+
+    treeRootHolder.setRoot(ReportComponent.builder(Component.Type.PROJECT, 1).setUuid("ABCD").setKey(PROJECT_KEY).build());
+
+    thrown.expect(MessageException.class);
+    thrown.expectMessage("Validation of project failed:");
+    thrown.expectMessage("hasn't been analysed before and the first analysis can't be incremental. Please launch a full analysis of the project.");
+
+    underTest.execute();
+  }
 }