GithubHelp home page GithubHelp logo

sonarsource / sonar-scanner-npm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bellingard/sonar-scanner-npm

38.0 3.0 10.0 903 KB

SonarQube Scanner for the JavaScript world

License: GNU Lesser General Public License v3.0

JavaScript 77.92% Starlark 0.13% Dockerfile 0.32% Shell 2.26% TypeScript 17.35% Java 2.01%

sonar-scanner-npm's Introduction

NPM module to run SonarQube/SonarCloud analyses

sonarqube-scanner makes it very easy to trigger SonarQube / SonarCloud analyses on a JavaScript code base, without needing to install any specific tool or (Java) runtime.

This module is analyzed on SonarCloud.

Quality Gate Maintainability Reliability Security Releases

Installation

Prerequisite: Node v16+ (otherwise use sonarqube-scanner v2.9.1)

This package is available on npm as: sonarqube-scanner

To add code analysis to your build files, simply add the package to your project dev dependencies:

npm install -D sonarqube-scanner

To install the scanner globally and be able to run analyses on the command line:

npm install -g sonarqube-scanner

Usage: add code analysis to your build files

Prerequisite: you've installed the package as a dev dependency.

The following example shows how to run an analysis on a JavaScript project, and pushing the results to a SonarQube instance:

const scanner = require('sonarqube-scanner');

scanner(
  {
    serverUrl: 'https://sonarqube.mycompany.com',
    token: '019d1e2e04eefdcd0caee1468f39a45e69d33d3f', // use "login" for SQ up to version 9
    options: {
      'sonar.projectName': 'My App',
      'sonar.projectDescription': 'Description for "My App" project...',
      'sonar.sources': 'src',
      'sonar.tests': 'test',
    },
  },
  () => process.exit(),
);

Syntax: sonarqube-scanner ( parameters, [callback] )

Arguments

  • parameters Map
    • serverUrl String (optional) The URL of the SonarQube server. Defaults to http://localhost:9000
    • login String (optional) The login used to connect to the SonarQube server up to version 9. Empty by default.
    • token String (optional) The token used to connect to the SonarQube server v10+ or SonarCloud. Empty by default.
    • caPath String (optional) the path to a CA to pass as https.request() options.
    • options Map (optional) Used to pass extra parameters for the analysis. See the official documentation for more details.
  • callback Function (optional) Callback (the execution of the analysis is asynchronous).

Usage: run analyses on the command line

Prerequisite: you've installed the package globally.

If you want to run an analysis without having to configure anything in the first place, simply run the sonar-scanner command. The following example assumes that you have installed SonarQube locally:

cd my-project
sonar-scanner

Specifying properties/settings

  • If there's a package.json file in the folder, it will be read to feed the analysis with basic information (like project name or version)

  • If there's a sonar-project.properties file in the folder, it will behave like the original SonarScanner

  • Additional analysis parameters can be passed on the command line using the standard -Dsonar.xxx=yyy syntax

    • Example:

      sonar-scanner -Dsonar.host.url=https://myserver.com -Dsonar.token=019d1e2e04e

Usage: run analyses with npx

To run analyses without explicitly installing the scanner, run the following command instead:

npx sonarqube-scanner

Similar to the above, you can specify analysis properties and settings using either a package.json file, a sonar-project.properties file, or command line arguments.

FAQ

I constantly get "Impossible to download and extract binary [...] In such situation, the best solution is to install the standard SonarScanner", what can I do?

You can install manually the standard SonarScanner, which requires to have a Java Runtime Environment available too (Java 8+).

It is important to make sure that the SonarScanner $install_directory/bin location is added to the system $PATH environment variable. This will ensure that sonar-scanner command will be resolved by the customScanner, and prevent the error:

Error: Local install of SonarScanner not found.
    at getLocalSonarScannerExecutable (<project_dir>/node_modules/sonarqube-scanner/src/sonar-scanner-executable.js:153:11)
    at scanUsingCustomScanner (<project_dir>/node_modules/sonarqube-scanner/src/index.js:52:3)
...

Once local installation is done, you can replace the 2nd line of the example:

var scanner = require('sonarqube-scanner').customScanner;

In my Docker container, the scanner fails with ".../jre/bin/java: not found", how do I solve this?

You are probably relying on Alpine for your Docker image, and Alpine does not include glibc by default. It needs to be installed manually.

Thanks to Philipp Eschenbach for troubleshooting this on issue #59.

Download From Mirrors

By default, the scanner binaries are downloaded from https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/. To use a custom mirror, set $SONAR_SCANNER_MIRROR. Or download precise version with $SONAR_SCANNER_VERSION

Example:

export SONAR_SCANNER_MIRROR=https://npm.taobao.org/mirrors/sonar-scanner/
export SONAR_SCANNER_VERSION=3.2.0.1227

or alternatively set variable in .npmrc

    sonar_scanner_mirror=https://npm.taobao.org/mirrors/sonar-scanner/
    sonar_scanner_version=3.2.0.1227

For mirrors using Basic HTTP authentication (e.g. Sonatype Nexus 3 raw-proxy, Artifactory with artifactory-cache-proxy), simply specify the username and password as part of the URL:

export SONAR_SCANNER_MIRROR=https://username:[email protected]/mirrors/sonar-scanner/

Proxy authentication is supported as well, see below.

Specifying the cache folder

By default, the scanner binaries are cached into $HOME/.sonar/native-sonar-scanner folder. To use a custom cache fodler instead of $HOME, set $SONAR_BINARY_CACHE.

Example:

export SONAR_BINARY_CACHE=/Users/myaccount/cache

or alternatively set variable in .npmrc

    sonar_binary_cache=/Users/myaccount/cache

Download behind proxy

In order to be able to download binaries when you're behind a proxy it will be enough to set the http_proxy or https_proxy environment variable. Both support proxies using plain HTTP or HTTPS.

Example:

export http_proxy=http://mycompanyproxy.com:PORT
export https_proxy=http://mycompanyproxy.com:PORT

export http_proxy=https://encryptedcompanyproxy.com:PORT
export https_proxy=https://encryptedcompanyproxy.com:PORT

Behind authenticated proxy:

export http_proxy=http://user:[email protected]:PORT
export https_proxy=http://user:[email protected]:PORT

export http_proxy=https://user:[email protected]:PORT
export https_proxy=https://user:[email protected]:PORT

License

sonarqube-scanner is licensed under the LGPL v3 License.

sonar-scanner-npm's People

Contributors

bellingard avatar dvolpato avatar dzienisz avatar ericmorand-sonarsource avatar gabssnake avatar gnuk avatar gucong3000 avatar henryju avatar ilia-kebets-sonarsource avatar jacek-poreda-sonarsource avatar jeph avatar julien-carsique-sonarsource avatar justinmcnamara74 avatar mfilotto avatar romanbalayan avatar saberduck avatar stefannikolei avatar tomverin avatar ugrave avatar vdiez avatar victor-diez-sonarsource avatar yassin-kammoun-sonarsource avatar zglicz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sonar-scanner-npm's Issues

execution failure while trying to analyse Python code locally on windows

C:\sonar-scanner-5.0.1.3006-windows\bin>sonar-scanner.bat INFO: Scanner configuration file: C:\sonar-scanner-5.0.1.3006-windows\bin..\conf\sonar-scanner.properties INFO: Project root configuration file: NONE INFO: SonarScanner 5.0.1.3006 INFO: Java 17.0.7 Eclipse Adoptium (64-bit) INFO: Windows 10 10.0 amd64 INFO: User cache: C:\Users\AREKAN.sonar\cache INFO: Analyzing on SonarQube server 9.9.0.65466 INFO: Default locale: "en_US", source code encoding: "UTF-8" INFO: Load global settings INFO: Load global settings (done) | time=105ms INFO: Server id: 147B411E-AYos9Bu0eOBihffPYMUp INFO: User cache: C:\Users\AREKAN.sonar\cache INFO: Load/download plugins INFO: Load plugins index INFO: Load plugins index (done) | time=48ms INFO: Load/download plugins (done) | time=313ms INFO: Loaded core extensions: developer-scanner INFO: Process project properties ERROR: Invalid value of sonar.sources for OLU-APP INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 2.546s INFO: Final Memory: 21M/74M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarScanner execution ERROR: The folder 'C:sonar-scanner-5.0.1.3006-windowsbincode' does not exist for 'OLU-APP' (base directory = C:\sonar-scanner-5.0.1.3006-windows\bin) ERROR:

I put my django code in a folder and then edited the .property file to point to the folder where my Django code is but when I ran the sonarscan.. i go the error shown

[Security] Vulnerable library brought in -> [email protected] #569

Seems the latest version of sonarqube-scanner (3.0.0) ends up bringing in the vulnerable library [email protected]. More details about this vulnerability here - https://security.snyk.io/package/npm/decompress-tar

The complete dependency tree is:

dependencies:
sonarqube-scanner 3.0.0
└─┬ decompress 4.2.1
├── decompress-tar 4.1.1
├─┬ decompress-tarbz2 4.1.1
│ └── decompress-tar 4.1.1
└─┬ decompress-targz 4.1.1
└── decompress-tar 4.1.1

Please consider changing the dependency tree so [email protected] is not used

Failure to download binaries should give other exit code than 0

If sonarqube-scanner command is unable to download sonar-scanner it will print an error messagen and then exit with status code 0. It would be better if it could exit with another status code.
In comparison, if there is a connection problem to the sonar-qube server, the program will exit with code 1.

npx sonarqube-scanner
...
[15:37:34] Trying to find a local install of the SonarScanner: C:\Users\xxxx\.sonar\native-sonar-scanner\sonar-scanner-4.7.0.2747-windows\bin\sonar-scanner.bat
Path not found.
[15:37:34] Proceed with download of the platform binaries for SonarScanner...
[15:37:34] Creating C:\Users\xxxx\.sonar\native-sonar-scanner
[15:37:34] error in downloader
[15:37:34] Error: getaddrinfo ENOTFOUND binaries.sonarsource.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:107:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'binaries.sonarsource.com'
}
[15:37:34] ERROR: impossible to download and extract binary: getaddrinfo ENOTFOUND binaries.sonarsource.com
[15:37:34]        SonarScanner binaries probably don't exist for your OS (windows).
[15:37:34]        In such situation, the best solution is to install the standard SonarScanner (requires a JVM).
[15:37:34]        Check it out at https://redirect.sonarsource.com/doc/install-configure-scanner.html

$ echo $?
0

It would be great if this behaviour could be changed, since failing quietly most often means that the uses have to spend more time troubleshooting.

Impossible to run scanner on an ARM MacBook because of the non-ARM embedded JRE

It seems this library cannot be used on a computer with ARM64 architecture because the downloaded binary of the scanner contains and uses its own JRE, which is not compatible with ARM64.

This results in the following logs:

(venv) ➜  app git:(develop) ✗ npx sonar-scanner -X                                                                          
[17:04:43] Starting analysis...
[17:04:43] Executable parameters built:
[17:04:43] {
  httpOptions: {},
  targetOS: 'macosx',
  installFolder: '/Users/cfecherolle/.sonar/native-sonar-scanner',
  platformExecutable: '/Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner',
  fileName: 'sonar-scanner-cli-5.0.1.3006-macosx.zip',
  downloadUrl: 'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-macosx.zip'
}
[17:04:43] Trying to find a local install of the SonarScanner: /Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner
[17:04:43] Proceed with download of the platform binaries for SonarScanner...
[17:04:43] Creating /Users/cfecherolle/.sonar/native-sonar-scanner
[====================] 100% 0.0s
[17:04:44] decompressing /Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-cli-5.0.1.3006-macosx.zip into /Users/cfecherolle/.sonar/native-sonar-scanner
[17:04:45] decompressed /Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner
/Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner: line 66: /Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-macosx/jre/bin/java: Bad CPU type in executable
/Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner: line 66: /Users/cfecherolle/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-macosx/jre/bin/java: Undefined error: 0

I haven't found a way to customize the path to the JRE and maybe provide my own, I'm not sure it is even possible. How could I make this work?

Implement most valuable features picked from Gab's compiled list

bellingard#165

  • Explicit organization configuration: easy
  • Clarify naming of projects with an npm org: easy or already done
  • Explicit use of external scanner: easy
  • Robust overrides in package.json and sonar-project.properties: easy
    • pick version from package.json>sonarqube.properties
    • project name: sonar-project.properties>package.json
  • Robust pick-up of sonar-project.properties (#104): easy
    • when running sonar-scanner, fetch sonar-project.properties correctly
  • Robust scanner version in .npmrc: medium
    • get data from .npmrc correctly
  • Clarify passing CLI arguments: easy
    • override data passing CLI args: supported, just need to document SQ props
  • Handling custom path for workspace files: medium
    • customize folder for scanner download/unpacking
  • Handling custom project settings path: easy
  • options of various versions compatibility: medium

SyntaxError: Unexpected token .

Since last week I'm getting this. Any help please?

11:44:57   npx: installed 62 in 9.725s
11:44:58   /home/buildagent/.npm/_npx/6488/lib/node_modules/sonarqube-scanner/src/sonar-scanner-params.js:152
11:44:58       if (pkg.bugs?.url) {
11:44:58                    ^
11:44:58   
11:44:58   SyntaxError: Unexpected token .
11:44:58       at Module._compile (internal/modules/cjs/loader.js:723:23)
11:44:58       at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
11:44:58       at Module.load (internal/modules/cjs/loader.js:653:32)
11:44:58       at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
11:44:58       at Function.Module._load (internal/modules/cjs/loader.js:585:3)
11:44:58       at Module.require (internal/modules/cjs/loader.js:692:17)
11:44:58       at require (internal/modules/cjs/helpers.js:25:18)
11:44:58       at Object.<anonymous> (/home/buildagent/.npm/_npx/6488/lib/node_modules/sonarqube-scanner/src/config.js:20:28)
11:44:58       at Module._compile (internal/modules/cjs/loader.js:778:30)
11:44:58       at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
11:44:59   Process exited with code 1
11:44:59   Process exited with code 1 (Step: Sonarqube (Command Line))
11:44:59   Step Sonarqube (Command Line) failed

Acuasec vulnerabilities

According with the reports from Aquasec you library contains vulnerabilities in these dependencies.

Solutions:

  • Upgrade package ansi-regex to version 5.0.1 or above.
  • Upgrade package browserslist to version 4.16.5 or above.
  • Upgrade package express to version 4.17.3 or above.
  • Upgrade package glob-parent to version 5.1.2 or above.
  • Upgrade package glob-parent to version 6.0.1 or above.
  • Upgrade package hosted-git-info to version 2.8.9 or above.
  • Upgrade package json5 to version 2.2.2 or above.
  • Upgrade package minimatch to version 3.0.5 or above.
  • Upgrade package minimist to version 1.2.6 or above.
  • Upgrade package path-parse to version 1.0.7 or above.
  • Upgrade package postcss to version 7.0.36 or above.
  • Upgrade package qs to version 6.7.3 or above.
  • Upgrade package semver to version 7.5.2 or above.
  • Upgrade package trim-newlines to version 3.0.1 or above.

All these looks line are under nested dependencies of .scannerwork/css-bundle/node_modules.

The 2.9.x release is a breaking change on Java 8

Copied from here: bellingard#172

At least it is on our version of Java 8. I have limited ability to change the Java version on these boxes so ideally it'd be nice if the 2.x.x stream remain compatible with Java 8:

bash-4.2$ java -version
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b26, mixed mode)

On 2.9.x:

[17:49:10] Starting analysis...
[17:49:10] Getting info from "package.json" file
[17:49:10] Checking if executable exists: /home/jenkins/.sonar/native-sonar-scanner/sonar-scanner-4.7.0.2747-linux/bin/sonar-scanner
[17:49:10] Platform binaries for SonarScanner found. Using it.
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

We accidentally picked up 2.9.x because of a pinned version, but given this is actually a breaking change, can this PR (bellingard#151) please be reverted, a patch version released to resolve this problem for downstream users, then a major release prepared with this change brought back in?

cleanup code

Configuration is built all along the execution of the code. It will be manageable if it's done clearly at a unique point.

  • refactor getSonarScannerExecutable: remove duplicate, remove convoluted callback pattern
  • unify configuration (env, args, params)
  • add prettier in orchestrator
  • refactor waitFor() in orchestrator

integration tests

write integration tests for the main features:

  • run scanner on project with single file
  • run scanner on real repo
  • use custom scanner

Write orchestrator framework in JS:

  • Download SQ: latest release
  • Save it in local cache: ~/.sonar/...
  • Return correct path when downloaded sq (not cached)
  • Run SQ
  • Create project
  • Generate token
  • Run the analysis
  • Use SQ API to fetch issues
  • Compare issues to expected ones
  • Test against latest and latest LTS
  • Refactor SQ web API calls with native node (dropped)
  • display progress on orchestrator downloader (requires to not use pipe)
  • kill server start waiter gracefully
  • build script which runs everything, executed in the ci. should fail if formatting fails
  • generate random port for orchestrator

SonarScanner fails when executing in a Windows environment

We are running the scanner in Windows locally using npm to installing it.

Output from the scanner:

>> sonar-scanner --define sonar.host=*** sonar.token=*** sonar.projectKey=my-project
[15:37:57] Starting analysis...
[15:37:57] Executable parameters built:
[15:37:57] {
  httpOptions: {},
  targetOS: 'windows',
  installFolder: 'C:\\Users\\user\\.sonar\\native-sonar-scanner',
  platformExecutable: 'C:\\Users\\user\\.sonar\\native-sonar-scanner\\sonar-scanner-5.0.1.3006-windows\\bin\\sonar-scanner.bat',
  fileName: 'sonar-scanner-cli-5.0.1.3006-windows.zip',
  downloadUrl: 'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-windows.zip'
}
[15:37:57] Trying to find a local install of the SonarScanner: C:\Users\user\.sonar\native-sonar-scanner\sonar-scanner-5.0.1.3006-windows\bin\sonar-scanner.bat
[15:37:57] Proceed with download of the platform binaries for SonarScanner...
[15:37:57] Creating C:\Users\user\.sonar\native-sonar-scanner
[====================] 100% 0.0s
[15:37:59] decompressing C:\Users\user\.sonar\native-sonar-scanner\sonar-scanner-cli-5.0.1.3006-windows.zip into C:\Users\user\.sonar\native-sonar-scanner
[15:38:00] decompressed C:\Users\user\.sonar\native-sonar-scanner\sonar-scanner-5.0.1.3006-windows\bin\sonar-scanner.bat
[15:38:00] No 'package.json' file found (or no valid one): ENOENT: no such file or directory, open 'C:\dev\my-project\package.json'
[15:38:00] => Using default settings.
>> $lastexitcode
1

It seems that is related with the latest published versions of NodeJS at the moment this issue is created. As the changelogs refer, now we cannot execute any .bat or .cmd file inside of a Node module. Here you can find the different change logs:

Documentation incorrect for v3.3.0

In the example documentation in the project repo, it states the following

const scanner = require('sonarqube-scanner');

scanner(
  {
    serverUrl: 'https://sonarqube.mycompany.com',
    token: '019d1e2e04eefdcd0caee1468f39a45e69d33d3f',
    options: {
      'sonar.projectName': 'My App',
      'sonar.projectDescription': 'Description for "My App" project...',
      'sonar.sources': 'src',
      'sonar.tests': 'test',
    },
  },
  () => process.exit(),
);

Which will result in the following error output (truncated)

INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: Not authorized. Analyzing this project requires authentication. Please provide a user token in sonar.login or other credentials in sonar.login and sonar.password.

The use of the token property has changed in v3 and should be

const scanner = require('sonarqube-scanner');

scanner(
  {
    serverUrl: 'https://sonarqube.mycompany.com',
    login: '019d1e2e04eefdcd0caee1468f39a45e69d33d3f', // <<< this change will make it work.
    options: {
      'sonar.projectName': 'My App',
      'sonar.projectDescription': 'Description for "My App" project...',
      'sonar.sources': 'src',
      'sonar.tests': 'test',
    },
  },
  () => process.exit(),
);

v3 seems to have introduced this breaking change.

[Feature Request]: Caching plugin downloads

Hi,

We are using this package in our CI/CD system inside a docker nightly built. So every time we run SonarQube scanner, it downloads all plugins from our sonar instance ~250Mb. Sonar is deployed in an external network with reduced BW so it spends some time downloading all the plugins in every build.

Could we implement some kind of caching for this?

Thanks.

Can only run one scan at a time or else get an error

I use Nx and would like to use distributed execution of the scanner. Instead I have to run --parellel=1 because sonar-scanner cannot handle multiple instances. This is the error I get:

... 60 more

Caused by: java.lang.IllegalStateException: Failed to create temp directory
at org.sonar.api.impl.utils.DefaultTempFolder.createTempDir(DefaultTempFolder.java:62)
at org.sonar.api.impl.utils.DefaultTempFolder.newDir(DefaultTempFolder.java:55)
at org.sonar.go.plugin.InstanceScopeGoConverter.(InstanceScopeGoConverter.java:32)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:211)
... 62 more
Caused by: java.nio.file.NoSuchFileException: /home/vsts/work/1/s/.scannerwork/.sonartmp/8791900543638969355
at java.base/sun.nio.fs.UnixException.translateToIOException(Unknown Source)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(Unknown Source)
at java.base/java.nio.file.Files.createDirectory(Unknown Source)
at java.base/java.nio.file.TempFileHelper.create(Unknown Source)
at java.base/java.nio.file.TempFileHelper.createTempDirectory(Unknown Source)
at java.base/java.nio.file.Files.createTempDirectory(Unknown Source)
at org.sonar.api.impl.utils.DefaultTempFolder.createTempDir(DefaultTempFolder.java:60)
... 70 more
ERROR:
The SonarQube scan failed for project '[projectName]'
Error: Command failed: /home/vsts/.sonar/native-sonar-scanner/sonar-scanner-5.0.1.3006-linux/bin/sonar-scanner --from=ScannerNpm/3.3.0
at checkExecSyncError (node:child_process:890:11)
at execFileSync (node:child_process:926:15)
at scan (/home/vsts/work/1/s/node_modules/sonarqube-scanner/src/index.js:40:3)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async module.exports.async (/home/vsts/work/1/s/node_modules/sonarqube-scanner/src/index.js:60:3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.