Skip to content

Commit 0f99a34

Browse files
Log sonarlint maxlines properties when project size is above the threshold (#933)
1 parent 45fc428 commit 0f99a34

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

sonar-python-plugin/src/main/java/org/sonar/plugins/python/indexer/SonarLintPythonIndexer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public void buildOnce(SensorContext context) {
6262
if (nLines > maxLinesForIndexing) {
6363
// Avoid performance issues for large projects
6464
LOG.debug("Project symbol table deactivated due to project size (total number of lines is {}, maximum for indexing is {})", nLines, maxLinesForIndexing);
65+
LOG.debug("Update \"sonar.python.sonarlint.indexing.maxlines\" to set a different limit.");
6566
return;
6667
}
6768
LOG.debug("Input files for indexing: " + files);

sonar-python-plugin/src/test/java/org/sonar/plugins/python/PythonSensorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ public void no_indexer_when_project_too_large_sonarlint() {
337337
sensor(CUSTOM_RULES, pythonIndexer).execute(context);
338338
assertThat(context.allIssues()).isEmpty();
339339
assertThat(logTester.logs(LoggerLevel.DEBUG)).contains("Project symbol table deactivated due to project size (total number of lines is 4, maximum for indexing is 1)");
340+
assertThat(logTester.logs(LoggerLevel.DEBUG)).contains("Update \"sonar.python.sonarlint.indexing.maxlines\" to set a different limit.");
340341
}
341342

342343
@Test

0 commit comments

Comments
 (0)