Permalink
Browse files

Adding Sonar/JavaScript analysis

  • Loading branch information...
1 parent 2d40113 commit 8826a6d234c54b190ac3d9f309ac7f457c2dc121 @StevenLooman committed Aug 19, 2012
Showing with 40 additions and 0 deletions.
  1. +18 −0 run_sonar.sh
  2. +22 −0 sonar-project.properties
View
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+rm -rf coverage
+rm -rf lib-cov
+
+mkdir coverage
+
+echo Running mocha
+node-jscoverage lib lib-cov
+mv lib lib-orig
+mv lib-cov lib
+mocha -R mocha-lcov-reporter > coverage/coverage.lcov
+mocha -R xunit > coverage/TEST-all.xml
+rm -rf lib
+mv lib-orig lib
+
+echo Running sonar-runner
+sonar-runner
View
@@ -0,0 +1,22 @@
+# project metadata (required)
+sonar.projectKey=js.saxpath
+sonar.projectName=SaXPath
+sonar.projectVersion=0.4.0
+
+# path to source directories (required)
+sources=lib
+
+# path to test source directories (optional)
+tests=test
+
+# The value of the property must be the key of the language.
+sonar.language=js
+
+# Advanced parameters
+sonar.javascript.jstestdriver.reportsfolder=coverage
+sonar.javascript.jstestdriver.coveragefile=coverage.lcov
+sonar.dynamicAnalysis=reuseReports
+
+# SCM plugin
+#sonar.scm.enabled=true
+#sonar.scm.url=scm:git:git://github.com/StevenLooman/saxpath.git

0 comments on commit 8826a6d

Please sign in to comment.