Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ExclusionProperties.java 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2021 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.core.config;
  21. import com.google.common.collect.ImmutableList;
  22. import java.util.List;
  23. import org.sonar.api.CoreProperties;
  24. import org.sonar.api.PropertyType;
  25. import org.sonar.api.config.PropertyDefinition;
  26. import org.sonar.api.resources.Qualifiers;
  27. public class ExclusionProperties {
  28. private ExclusionProperties() {
  29. // only static stuff
  30. }
  31. public static List<PropertyDefinition> all() {
  32. return ImmutableList.of(
  33. // COVERAGE
  34. PropertyDefinition.builder(CoreProperties.PROJECT_COVERAGE_EXCLUSIONS_PROPERTY)
  35. .category(CoreProperties.CATEGORY_EXCLUSIONS)
  36. .subCategory(CoreProperties.SUBCATEGORY_COVERAGE_EXCLUSIONS)
  37. .type(PropertyType.STRING)
  38. .multiValues(true)
  39. .onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
  40. .build(),
  41. // FILES
  42. PropertyDefinition.builder(CoreProperties.GLOBAL_EXCLUSIONS_PROPERTY)
  43. .name("Global Source File Exclusions")
  44. .multiValues(true)
  45. .category(CoreProperties.CATEGORY_EXCLUSIONS)
  46. .subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
  47. .index(0)
  48. .build(),
  49. PropertyDefinition.builder(CoreProperties.GLOBAL_TEST_EXCLUSIONS_PROPERTY)
  50. .name("Global Test File Exclusions")
  51. .multiValues(true)
  52. .category(CoreProperties.CATEGORY_EXCLUSIONS)
  53. .subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
  54. .index(1)
  55. .build(),
  56. PropertyDefinition.builder(CoreProperties.PROJECT_EXCLUSIONS_PROPERTY)
  57. .name("Source File Exclusions")
  58. .multiValues(true)
  59. .category(CoreProperties.CATEGORY_EXCLUSIONS)
  60. .subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
  61. .onQualifiers(Qualifiers.PROJECT)
  62. .index(0)
  63. .build(),
  64. PropertyDefinition.builder(CoreProperties.PROJECT_INCLUSIONS_PROPERTY)
  65. .name("Source File Inclusions")
  66. .multiValues(true)
  67. .category(CoreProperties.CATEGORY_EXCLUSIONS)
  68. .subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
  69. .onQualifiers(Qualifiers.PROJECT)
  70. .index(1)
  71. .build(),
  72. PropertyDefinition.builder(CoreProperties.PROJECT_TEST_EXCLUSIONS_PROPERTY)
  73. .name("Test File Exclusions")
  74. .multiValues(true)
  75. .category(CoreProperties.CATEGORY_EXCLUSIONS)
  76. .subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
  77. .onQualifiers(Qualifiers.PROJECT)
  78. .index(2)
  79. .build(),
  80. PropertyDefinition.builder(CoreProperties.PROJECT_TEST_INCLUSIONS_PROPERTY)
  81. .name("Test File Inclusions")
  82. .multiValues(true)
  83. .category(CoreProperties.CATEGORY_EXCLUSIONS)
  84. .subCategory(CoreProperties.SUBCATEGORY_FILES_EXCLUSIONS)
  85. .onQualifiers(Qualifiers.PROJECT)
  86. .index(3)
  87. .build()
  88. );
  89. }
  90. }