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

SCANNPM-49 Fix compatibility with other scanners (CLI, Scanner Engine) #182

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

7PH
Copy link

@7PH 7PH commented Nov 29, 2024

This PR fixes 2 issues:

sonar.working.directory

Described by this ticket:

  • The default value set by the NPM Scanner is now .scannerwork, same as the Scanner CLI
  • If a value is set by any mean, it will override this value

archive extraction path

The path for archive extraction was different than the one for the CLI Scanner. Therefore, when:

  • Cleaning the .sonar folder
  • Analyzing a project with the CLI Scanner
  • Analyzing a project with the NPM Scanner

The analysis failed because the NPM Scanner is looking for the extracted content in ~/.sonar/cache/{sha}/{filename}_extracted where the CLI Scanner stored it in ~/.sonar/cache/{sha}/{filename}_unzip. I've synchronized the value for both to _unzip.

@7PH 7PH force-pushed the bugfix/br/scannpm-49-npm-work-dir branch from f705ee2 to 623f232 Compare November 29, 2024 13:55
@7PH 7PH changed the title SCANNPM-49 Set sonar.working.directory for npm scanner to avoid potential collision with userHome SCANNPM-49 Fix compatibility with other scanners (CLI, Scanner Engine) Nov 29, 2024
Copy link

@lucas-paulger-sonarsource lucas-paulger-sonarsource left a comment

Choose a reason for hiding this comment

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

I see the working directory is functioning as expected 👍🏻

@7PH 7PH force-pushed the bugfix/br/scannpm-49-npm-work-dir branch from e042a0a to 7c35af2 Compare December 12, 2024 09:03
@7PH 7PH force-pushed the bugfix/br/scannpm-49-npm-work-dir branch from 7c35af2 to 1ec2094 Compare December 12, 2024 10:02
@7PH 7PH merged commit 10bbd77 into master Dec 12, 2024
7 checks passed
@7PH 7PH deleted the bugfix/br/scannpm-49-npm-work-dir branch December 12, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants