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

SONARPY-2538 Revert "SONARPY-2506 Remove use of deprecated qualifiers" #2275

Merged
merged 1 commit into from
Jan 23, 2025
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
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
CIRRUS_CLONE_DEPTH: 10
SONARSOURCE_QA: true
matrix:
- SQ_VERSION: LATEST_RELEASE[25.1]
- SQ_VERSION: LATEST_RELEASE[10.6]
- SQ_VERSION: DEV
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
Expand Down Expand Up @@ -237,7 +237,7 @@
cleanup_before_cache_script: cleanup_maven_repository
cleanup_before_orchestrator_cache_script: bash .cirrus/clean-orchestrator-cache.sh

promote_task:

Check warning on line 240 in .cirrus.yml

View check run for this annotation

Cirrus CI / Build Parsing Results

.cirrus.yml#L240

task "promote" depends on task "ws_scan", but their only_if conditions are different
depends_on:
- test_analyze
- ruling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
*/
package org.sonar.plugins.python;

import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.Plugin;
import org.sonar.api.PropertyType;
import org.sonar.api.SonarProduct;
import org.sonar.api.SonarRuntime;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.resources.Qualifiers;
import org.sonar.plugins.python.api.SonarLintCache;
import org.sonar.plugins.python.bandit.BanditRulesDefinition;
import org.sonar.plugins.python.bandit.BanditSensor;
Expand Down Expand Up @@ -103,7 +103,7 @@ private static void addCoberturaExtensions(Plugin.Context context) {
"The reports have to conform to the Cobertura XML format.")
.category(PYTHON_CATEGORY)
.subCategory(TEST_AND_COVERAGE)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.defaultValue(PythonCoverageSensor.DEFAULT_REPORT_PATH)
.multiValues(true)
.build(),
Expand All @@ -115,7 +115,7 @@ private static void addCoberturaExtensions(Plugin.Context context) {
"Path to a coverage report. Ant patterns are accepted for relative path. The report has to conform to the Cobertura XML format.")
.category(PYTHON_CATEGORY)
.subCategory(TEST_AND_COVERAGE)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.defaultValue("")
.build(),
PythonCoverageSensor.class);
Expand All @@ -130,7 +130,7 @@ private static void addXUnitExtensions(Plugin.Context context) {
"are not found. Disabled by default.")
.category(PYTHON_CATEGORY)
.subCategory(TEST_AND_COVERAGE)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.defaultValue("false")
.type(PropertyType.BOOLEAN)
.build(),
Expand All @@ -141,7 +141,7 @@ private static void addXUnitExtensions(Plugin.Context context) {
"conform to the junitreport XML format.")
.category(PYTHON_CATEGORY)
.subCategory(TEST_AND_COVERAGE)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.defaultValue(PythonXUnitSensor.DEFAULT_REPORT_PATH)
.build(),
PythonXUnitSensor.class);
Expand All @@ -154,7 +154,7 @@ private static void addBanditExtensions(Plugin.Context context) {
.description("Paths (absolute or relative) to json files with Bandit issues.")
.category(EXTERNAL_ANALYZERS_CATEGORY)
.subCategory(PYTHON_CATEGORY)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.multiValues(true)
.build(),
BanditRulesDefinition.class);
Expand All @@ -167,7 +167,7 @@ private static void addPylintExtensions(Plugin.Context context) {
.description("Paths (absolute or relative) to report files with Pylint issues.")
.category(EXTERNAL_ANALYZERS_CATEGORY)
.subCategory(PYTHON_CATEGORY)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.multiValues(true)
.build(),
PylintRulesDefinition.class);
Expand All @@ -180,7 +180,7 @@ private static void addFlake8Extensions(Plugin.Context context) {
.description("Paths (absolute or relative) to report files with Flake8 issues.")
.category(EXTERNAL_ANALYZERS_CATEGORY)
.subCategory(PYTHON_CATEGORY)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.multiValues(true)
.build(),
Flake8RulesDefinition.class);
Expand All @@ -193,7 +193,7 @@ private static void addMypyExtensions(Plugin.Context context) {
.description("Paths (absolute or relative) to report files with Mypy issues.")
.category(EXTERNAL_ANALYZERS_CATEGORY)
.subCategory(PYTHON_CATEGORY)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.multiValues(true)
.build(),
MypyRulesDefinition.class);
Expand All @@ -206,7 +206,7 @@ private static void addRuffExtensions(Plugin.Context context) {
.description("Paths (absolute or relative) to report files with Ruff issues.")
.category(EXTERNAL_ANALYZERS_CATEGORY)
.subCategory(PYTHON_CATEGORY)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.multiValues(true)
.build(),
RuffRulesDefinition.class);
Expand All @@ -220,7 +220,7 @@ private static PropertyDefinition buildPythonVersion() {
.multiValues(true)
.category(PYTHON_CATEGORY)
.subCategory(GENERAL)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.build();
}

Expand All @@ -232,7 +232,7 @@ private static PropertyDefinition buildIpynbPythonSuffix() {
.multiValues(true)
.category(PYTHON_CATEGORY)
.subCategory(GENERAL)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.defaultValue("ipynb")
.build();
}
Expand All @@ -245,7 +245,7 @@ private static PropertyDefinition buildPythonSuffix() {
.multiValues(true)
.category(PYTHON_CATEGORY)
.subCategory(GENERAL)
.onConfigScopes(Set.of(PropertyDefinition.ConfigScope.PROJECT))
.onQualifiers(Qualifiers.PROJECT)
.defaultValue("py")
.build();
}
Expand Down
Loading