Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sonar-scanner

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sonar-scanner

Wrap sonar-scanner as a node module

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is sonar-scanner?

The sonar-scanner npm package is a tool for running SonarQube analysis on your projects. It helps in identifying bugs, vulnerabilities, and code smells in your codebase by integrating with SonarQube, a popular static code analysis tool.

What are sonar-scanner's main functionalities?

Basic Analysis

This feature allows you to perform a basic analysis of your project by specifying the server URL, project key, source directory, and authentication token.

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

scanner({
  serverUrl: 'http://localhost:9000',
  options: {
    'sonar.projectKey': 'my-project',
    'sonar.sources': './src',
    'sonar.login': 'your-sonar-token'
  }
}, () => process.exit());

Custom Configuration

This feature allows you to customize the analysis configuration by specifying additional options such as file exclusions and programming language.

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

scanner({
  serverUrl: 'http://localhost:9000',
  options: {
    'sonar.projectKey': 'my-project',
    'sonar.sources': './src',
    'sonar.exclusions': '**/*.test.js',
    'sonar.language': 'js',
    'sonar.login': 'your-sonar-token'
  }
}, () => process.exit());

Multi-module Project Analysis

This feature allows you to analyze multi-module projects by specifying the modules and their respective base directories.

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

scanner({
  serverUrl: 'http://localhost:9000',
  options: {
    'sonar.projectKey': 'my-multi-module-project',
    'sonar.modules': 'module1,module2',
    'module1.sonar.projectBaseDir': './module1',
    'module2.sonar.projectBaseDir': './module2',
    'sonar.login': 'your-sonar-token'
  }
}, () => process.exit());

Other packages similar to sonar-scanner

Keywords

FAQs

Package last updated on 19 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc