If your question is about SonarLint in the IntelliJ Platform, VS Code, Visual Studio, or Eclipse, please post it in that sub-category.
Otherwise, please provide:
- Operating system: Mac OS Sequoia 15.3.1
- IDE name and flavor/env: Intellij IDEA 2024.1.7
And a thorough description of the problem / question:
Hello again. I’m pushing a little more from when i posted this.
Now i’m trying to retrieve Project information (Quality profiles + rules) even when the option “Bind project” is disabled, retrieving the Project name from the IDE and sending it to a custom proxy API that resolves it.
Im currently creating (if it does not exist) a Settings for the project and a Connection for each project that is opened on the IDE. If it does exist it retrieves it.
I’ve found that this configurations are stored on “/library/caches/Jetbrains/IntellijIdea2024.1/sonarlint” encoding the connection names.
I’m currently creating this connections with the following code:
ServerConnection newServerConnection = ServerConnection.newBuilder().setName(connectionName).setHostUrl(DEFAULT_CONNECTION_URL).build();
SonarLintGlobalSettings globalSettings = Settings.getGlobalSettings();
globalSettings.addServerConnection(newServerConnection);
getService(SonarLintGlobalSettingsStore.class).save(globalSettings);
The main issue is that sometimes the folders and files on the FileSystem are created immediately and it works fine but sometimes it does not and throws this error:
Caused by: org.sonarsource.sonarlint.core.serverconnection.storage.StorageException: Failed to read file: /Users/myuser/Library/Caches/JetBrains/IntelliJIdea2024.1/sonarlint/storage/636f6e6e656374696f6e2d636f64652d636f7665726167652d617069/projects/636f64652d636f7665726167652d617069/analyzer_config.pb
¿Is there any way to “force” this folders creation so the Core can retrieve this information when needed?
Thanks for reading and the help!