You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReportComputationSteps.java 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2019 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. package org.sonar.ce.task.projectanalysis.step;
  21. import java.util.Arrays;
  22. import java.util.List;
  23. import org.sonar.ce.task.container.TaskContainer;
  24. import org.sonar.ce.task.projectanalysis.filemove.FileMoveDetectionStep;
  25. import org.sonar.ce.task.projectanalysis.measure.PostMeasuresComputationChecksStep;
  26. import org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep;
  27. import org.sonar.ce.task.projectanalysis.qualityprofile.RegisterQualityProfileStatusStep;
  28. import org.sonar.ce.task.projectanalysis.source.PersistFileSourcesStep;
  29. import org.sonar.ce.task.step.ComputationStep;
  30. import org.sonar.ce.task.step.ExecuteStatelessInitExtensionsStep;
  31. /**
  32. * Ordered list of steps classes and instances to be executed for batch processing
  33. */
  34. public class ReportComputationSteps extends AbstractComputationSteps {
  35. private static final List<Class<? extends ComputationStep>> STEPS = Arrays.asList(
  36. ExtractReportStep.class,
  37. PersistScannerContextStep.class,
  38. PersistAnalysisWarningsStep.class,
  39. DbMigrationsStep.class,
  40. GenerateAnalysisUuid.class,
  41. // Builds Component tree
  42. LoadReportAnalysisMetadataHolderStep.class,
  43. ExecuteStatelessInitExtensionsStep.class,
  44. VerifyBillingStep.class,
  45. BuildComponentTreeStep.class,
  46. ValidateProjectStep.class,
  47. LoadQualityProfilesStep.class,
  48. // load project related stuffs
  49. LoadQualityGateStep.class,
  50. LoadPeriodsStep.class,
  51. FileMoveDetectionStep.class,
  52. // load duplications related stuff
  53. LoadDuplicationsFromReportStep.class,
  54. LoadCrossProjectDuplicationsRepositoryStep.class,
  55. // data computation
  56. SizeMeasuresStep.class,
  57. NewCoverageMeasuresStep.class,
  58. CoverageMeasuresStep.class,
  59. CommentMeasuresStep.class,
  60. CustomMeasuresCopyStep.class,
  61. DuplicationMeasuresStep.class,
  62. NewSizeMeasuresStep.class,
  63. LanguageDistributionMeasuresStep.class,
  64. UnitTestMeasuresStep.class,
  65. ComplexityMeasuresStep.class,
  66. LoadMeasureComputersStep.class,
  67. RegisterQualityProfileStatusStep.class,
  68. ExecuteVisitorsStep.class,
  69. PostMeasuresComputationChecksStep.class,
  70. QualityGateMeasuresStep.class,
  71. // Must be executed after computation of language distribution
  72. ComputeQProfileMeasureStep.class,
  73. // Must be executed after computation of quality profile measure
  74. QualityProfileEventsStep.class,
  75. // Must be executed after computation of quality gate measure
  76. QualityGateEventsStep.class,
  77. // Persist data
  78. PersistComponentsStep.class,
  79. PersistAnalysisStep.class,
  80. PersistAnalysisPropertiesStep.class,
  81. PersistMeasuresStep.class,
  82. PersistLiveMeasuresStep.class,
  83. PersistDuplicationDataStep.class,
  84. PersistAdHocRulesStep.class,
  85. PersistIssuesStep.class,
  86. PersistProjectLinksStep.class,
  87. PersistEventsStep.class,
  88. PersistFileSourcesStep.class,
  89. PersistCrossProjectDuplicationIndexStep.class,
  90. EnableAnalysisStep.class,
  91. UpdateQualityProfilesLastUsedDateStep.class,
  92. PurgeDatastoresStep.class,
  93. IndexAnalysisStep.class,
  94. // notifications are sent at the end, so that webapp displays up-to-date information
  95. SendIssueNotificationsStep.class,
  96. PublishTaskResultStep.class,
  97. TriggerViewRefreshStep.class);
  98. public ReportComputationSteps(TaskContainer taskContainer) {
  99. super(taskContainer);
  100. }
  101. /**
  102. * List of all {@link ComputationStep},
  103. * ordered by execution sequence.
  104. */
  105. @Override
  106. public List<Class<? extends ComputationStep>> orderedStepClasses() {
  107. return STEPS;
  108. }
  109. }