hmvictor / radar-netbeans

A SonarQube plugin for Netbeans
Other
33 stars 22 forks source link

PHP and JS language support #43

Closed juanlopez4691 closed 6 years ago

juanlopez4691 commented 8 years ago

Does Radar support PHP and JS language files? When I try to scan my project ("Get issues with Sonar"), I get an error message: "This project does not contain sources to analyze".

Connection to my sonarqube server (sonarqube v5.3) seems to be working right, as I can do "Get issues from server" and I get the projects list and the issues list of the project I choose.

In the project sources root folder I have a local sonar-project.properties with the following content:

# Required metadata
sonar.projectKey=es.mutuadepropietarios:listadosPentaho-master
sonar.projectName=listadosPentaho
sonar.projectVersion=1.0

# Comma-separated paths to directories with sources (required)
sonar.sources=.

# Language
# sonar.language=php

# Encoding of the source files
sonar.sourceEncoding=UTF-8

sonar.analysis.mode=issues
sonar.issuesReport.html.enable=true
sonar.issuesReport.console.enable=true

sonar.exclusions=
sonar.inclusions=*.php,controllers/**/*.php,models/**/*.php,views/**/*.ctp,webroot/js/*.js,webroot/css/*.css,libs/**/*

I am currently using sonar-scanner 2.5.1 from a system prompt (Windows 7) and it works ok: I get results (issues) and HTML reports are generated. I run sonar-scanner with the following .bat file:

call C:\Projectes\Sonar\sonar-scanner\bin\sonar-runner 2>&1

if exist .sonar/issues-report/issues-*.html (
    if "%1" == "full" (
        start .sonar/issues-report/issues-report.html
    ) else (
        start .sonar/issues-report/issues-report-light.html
    )
)
hmvictor commented 8 years ago

Hi @juanlopez4691 At this very moment, Radar only supports Java projects. That's because I'm a java programmer and I don't know so much about other languages (maybe a little of javascript).

But you could send me a PHP netbeans project and I could run some experiments. And sure, Radar is open to contributions.

Thank you so much for your suggestions.