title: SonarQube Pre-commit analysis for JavaScript
body: <p>I need to find a way to do a pre-commit incremental analysis with rules supplied by SonarQube 5.4 hosted on a server. The most important files to analyze are JavaScript files, and we are working in C# using ASP.NET framework, so installing Eclipse for a large team is not feasible. </p>
  
  <p>I have tried Sonar-Scanner 2.8, but it does not pick up the analysis already done on the server (shows all issues as new), and it also does not react to exclusions. Documentation on that matter is outdated, as, for example, <em>incremental</em> analysis is not supported anymore, and <em>issues</em> analysis is not documented properly regarding what it does,</p>
  
  <p>Some relevant parts from <em>sonar-project.properties</em>:</p>
  
  <pre><code>sonar.exclusions=**/Scripts/*angular*.js,**/Scripts/*bootstrap*.js,**/Scripts/*d3*.js,**/Scripts/*jquery*.js,**/Scripts/*modernizr*.js,**/Scripts/*respond*.js,**/Scripts/*toolkit*.js,**/tbshared/**/*.*,**/Scripts/*reference*.js,**/packages/**/*.*,**/Scripts/angular*.map,**/Scripts/*.json,**/Scripts/*.css,**/Scripts/i18n/*.* 
  ...    
  #Enable HTML
      sonar.issuesReport.html.enable=true
  
      #Enable console output
      sonar.issuesReport.console.enable
  
      #Enable incremental analysis
      sonar.analysis.mode=issues
  </code></pre>