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

SonarLint doesn't work out-of-the-box on arm64 hosts #617

Open
rjaegers opened this issue Oct 23, 2024 · 2 comments
Open

SonarLint doesn't work out-of-the-box on arm64 hosts #617

rjaegers opened this issue Oct 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@rjaegers
Copy link
Member

Describe the bug
On arm64 hardware, e.g. Apple Silicon Macs, the SonarLint extension does not work out-of-the-box. The SonarLint extension requires a Java runtime (JRE) which can be installed by the extension. But this installation process fails on arm64.

To Reproduce
Steps to reproduce the behavior:

  1. Open a project with amp-devcontainer-cpp on an arm64 host
  2. Introduce an issue that SonarLint should find, e.g. an unused variable
  3. See that no issue is reported

Expected behavior
SonarLint should run and mark the issue with yellow squiggles.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Container: ghcr.io/philips-software/amp-devcontainer-cpp:3.5.0
  • OS: OSX
  • Architecture: Apple M3 (AppleSilicon)
  • Docker Version: Docker Desktop 4.34.2

Additional context
As a work-around a JRE can be installed by:

apt-get update && apt-get install --no-install-recommends -y openjdk-17-jre

Followed by setting the Java home setting for SonarLint:

"sonarlint.ls.javaHome": "/usr/lib/jvm/java-17-openjdk-arm64"
@rjaegers rjaegers added the bug Something isn't working label Oct 23, 2024
Copy link
Contributor

Thank you for adding your first issue. We will be looking into it as soon as possible.

@rjaegers
Copy link
Member Author

According to SonarSource the JRE should be bundled with the extension for arm64.

Source: https://community.sonarsource.com/t/sonarlint-for-vscode-3-7-jre-included-for-most-platforms-java-rules-for-aws-cloud-applications/67912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant