You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I put exactly the same code for sonar task in my gulpfile.js file:
gulp.task('sonar',function(){varoptions={sonar: {host: {url: 'http://localhost:9000'},projectKey: 'conn-ui',projectName: 'Conn App UI',//projectVersion: '1.0.0',// comma-delimited string of source directories sources: 'app/js,app/lib',language: 'js',sourceEncoding: 'UTF-8',javascript: {lcov: {reportPath: 'test/sonar_report/lcov.info'}},exec: {// All these properties will be send to the child_process.exec method (see: https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback ) // Increase the amount of data allowed on stdout or stderr (if this value is exceeded then the child process is killed, and the gulp-sonar will fail). maxBuffer : 1024*1024}}};// gulp source doesn't matter, all files are referenced in options object above returngulp.src('thisFileDoesNotExist.js',{read: false}).pipe(sonar(options)).on('error',util.log);});
However I always get the following error messages when I invoke gulp sonar command:
using args { _: [ 'sonar' ], env: 'local-java', e: 'local-java' }
[15:36:54] Using gulpfile ~/p/conn/ui/app/gulpfile.js
[15:36:54] Starting 'sonar'...
[15:36:54] 'sonar' errored after 7.8 ms
[15:36:54] ReferenceError: sonar is not defined
at Gulp.<anonymous> (/home/luog/p/conn/ui/app/gulpfile.js:495:15)
at module.exports (/home/luog/p/conn/ui/app/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/home/luog/p/conn/ui/app/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/home/luog/p/conn/ui/app/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/home/luog/p/conn/ui/app/node_modules/orchestrator/index.js:134:8)
at /usr/lib/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Function.Module.runMain (module.js:449:11)
at startup (node.js:148:18)
at node.js:405:3
Do you know where I am wrong?
The text was updated successfully, but these errors were encountered:
greenlaw110
changed the title
Doesn't work for me
Help needed: "ReferenceError: sonar is not defined" error
Jun 7, 2016
I put exactly the same code for sonar task in my
gulpfile.js
file:However I always get the following error messages when I invoke
gulp sonar
command:Do you know where I am wrong?
The text was updated successfully, but these errors were encountered: