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

SONARJAVA-4988: Use SonarLintCache component and make it accessible to custom rules via the caching APIs #4792

Merged
merged 15 commits into from
Jun 4, 2024

Conversation

anton-haubner-sonarsource
Copy link
Contributor

@anton-haubner-sonarsource anton-haubner-sonarsource commented May 23, 2024

Please ensure your pull request adheres to the following guidelines:

  • Use the following formatting style: SonarSource/sonar-developer-toolset
  • Unit tests are passing and you provided a unit test for your fix
  • ITs should pass : To run ITs locally, checkout the README of the project.
  • If there is a Jira ticket available, please make your commits and pull request start with the ticket number (SONARJAVA-XXXX)

DBD custom rules need this information to turn off saving IR to the
filesystem in a SonarLint context
@anton-haubner-sonarsource anton-haubner-sonarsource force-pushed the SONARJAVA-4988 branch 8 times, most recently from 0a52aa2 to 6da8f93 Compare May 29, 2024 14:53
Comment on lines +382 to +383
issue.setPrimaryLocation((InputFile) fileOrProject, analyzerMessage.getMessage(), textSpan.startLine, textSpan.startCharacter,
textSpan.endLine, textSpan.endCharacter);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing changed here, this is just the auto formatting.

Comment on lines +555 to +556
"Cannot determine whether the context allows skipping unchanged files: canSkipUnchangedFiles not part of sonar-plugin-api. " +
"Not skipping. {}",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, this is just a formatting change.

Comment on lines +119 to +126
private static final String LOG_MESSAGE_FILES_CAN_BE_SKIPPED =
"The Java analyzer is running in a context where unchanged files can be skipped. " +
"Full analysis is performed for changed files, optimized analysis for unchanged files.";
private static final String LOG_MESSAGE_FILES_CANNOT_BE_SKIPPED =
"The Java analyzer cannot skip unchanged files in this context. A full analysis is performed for all files.";
private static final String LOG_MESSAGE_CANNOT_DETERMINE_IF_FILES_CAN_BE_SKIPPED =
"Cannot determine whether the context allows skipping unchanged files: " +
"canSkipUnchangedFiles not part of sonar-plugin-api. Not skipping. {}";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are again just formatting changes.

@anton-haubner-sonarsource anton-haubner-sonarsource marked this pull request as ready for review May 29, 2024 15:18
Copy link
Member

@alban-auzeill alban-auzeill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good work in the comments to explain why we have this temporary hack, it should help later to remove it.

@anton-haubner-sonarsource anton-haubner-sonarsource merged commit 0a5e7a4 into master Jun 4, 2024
15 checks passed
@anton-haubner-sonarsource anton-haubner-sonarsource deleted the SONARJAVA-4988 branch June 4, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants