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-2466 Remove unused code #2244

Merged
merged 1 commit into from
Dec 13, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.sonarqube.ws.Measures.Measure;

import static com.sonar.python.it.plugin.TestsUtils.getMeasure;
import static com.sonar.python.it.plugin.TestsUtils.getMeasureAsDouble;
import static com.sonar.python.it.plugin.TestsUtils.getMeasureAsInt;
import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -45,12 +43,10 @@ class MetricsTest {
private static final String DUPLICATED_FILES = "duplicated_files";
private static final String DUPLICATED_LINES = "duplicated_lines";
private static final String DUPLICATED_LINES_DENSITY = "duplicated_lines_density";
private static final String EXECUTABLE_LINES_DATA = "executable_lines_data";
private static final String FILES = "files";
private static final String FUNCTIONS = "functions";
private static final String LINES = "lines";
private static final String NCLOC = "ncloc";
private static final String NCLOC_DATA = "ncloc_data";
private static final String STATEMENTS = "statements";
private static final String TESTS = "tests";
private static final String VIOLATIONS = "violations";
Expand Down Expand Up @@ -155,10 +151,6 @@ void file_level() {

/* Helper methods */

private Measure getProjectMeasure(String metricKey) {
return getMeasure(PROJECT_KEY, metricKey);
}

private Integer getProjectMeasureAsInt(String metricKey) {
return getMeasureAsInt(PROJECT_KEY, metricKey);
}
Expand All @@ -167,10 +159,6 @@ private Double getProjectMeasureAsDouble(String metricKey) {
return getMeasureAsDouble(PROJECT_KEY, metricKey);
}

private Measure getDirectoryMeasure(String metricKey) {
return getMeasure(keyFor("dir"), metricKey);
}

private Integer getDirectoryMeasureAsInt(String metricKey) {
return getMeasureAsInt(keyFor("dir"), metricKey);
}
Expand All @@ -179,10 +167,6 @@ private Double getDirectoryMeasureAsDouble(String metricKey) {
return getMeasureAsDouble(keyFor("dir"), metricKey);
}

private Measure getFileMeasure(String metricKey) {
return getMeasure(keyFor(HELLO_WORLD_PY), metricKey);
}

private Integer getFileMeasureAsInt(String metricKey) {
return getMeasureAsInt(keyFor(HELLO_WORLD_PY), metricKey);
}
Expand Down
Loading