Hi Team,
How to analyse .Js files?. We are using Jenkins pipeline to run the scans in SonarQube. We are able to scan all the files in the repository but it is excluding .Js files.
Below is the sonar.properties -
sonar.host.url=https://.com
sonar.login=mkfdmvjajcbdckjdsbvjsdvks
sonar.projectKey=Management_Latest
sonar.projectName=Management_Latest
sonar.java.binaries=.
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
sonar.nodejs.executable=.
Below is the output from the Jenkins build -
INFO: Analysis report compressed in 1666ms, zip size=3 MB
INFO: Analysis report uploaded in 259ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://com/dashboard?id=Cloudlink_SonarQube_Management_Latest
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at https:/.com id=AX4tyNk_iy01xZDXYM8Z
INFO: Analysis total time: 1:38.806 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:40.238s
INFO: Final Memory: 248M/1573M
INFO: ------------------------------------------------------------------------
Parsing POMs
Established TCP socket on 43681
maven33-agent.jar already up to date
maven33-interceptor.jar already up to date
maven3-interceptor-commons.jar already up to date
[Cloudlink_SecureVM_SonarQube_Scanning] $ /usr/lib/jvm/java-1.8.0-openjdk/bin/java -cp /var/lib/jenkins/maven33-agent.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-autoinstall/boot/plexus-classworlds-2.5.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-autoinstall/conf/logging jenkins.maven3.agent.Maven33Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-autoinstall /var/lib/jenkins/remoting.jar /var/lib/jenkins/maven33-interceptor.jar /var/lib/jenkins/maven3-interceptor-commons.jar 43681
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven: -B -f /var/lib/jenkins/workspace/CloudLink/Cloudlink_SecureVM_SonarQube_Scanning/pom.xml package
[INFO] Scanning for projects...
[HUDSON] Collecting dependencies info[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[HUDSON] Collecting dependencies info[INFO]
[INFO] cloudlink-project: CloudLink root project
[INFO] cloudlink-common: Common classes for all modules
[INFO] cloudlink-emulator: Debug emulators
[INFO] cloudlink-engine: Business logic and DB access tier
[INFO] cloudlink-web: CloudLink Web Center
[HUDSON] Collecting dependencies info
[INFO] cloudlink-web-root: Application for the root context to redirect to CloudLink Center
[INFO] cloudlink-embedded: Embedded launcher for CloudLink Web Center
[INFO] cloudlink-installer: Installer for CloudLink Web Center
[HUDSON] Collecting dependencies info
[INFO] cloudlink-tools: CloudLink Tools
[INFO] property-decryptor: Property files decryptor tool
[HUDSON] Collecting dependencies info
[HUDSON] Collecting dependencies info
[HUDSON] Collecting dependencies info
[HUDSON] Collecting dependencies info
[HUDSON] Collecting dependencies info
[HUDSON] Collecting dependencies info
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cloudlink-project: CloudLink root project 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cloudlink-common: Common classes for all modules 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.springframework.security.oauth:spring-security-oauth2:jar:2.0.3.RELEASE is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ cloudlink-common ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Copying 16 resources
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ cloudlink-common ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ cloudlink-common ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/CloudLink/Cloudlink_SecureVM_SonarQube_Scanning/cloudlink-common/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ cloudlink-common ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cloudlink-common ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (schema-generation) @ cloudlink-common ---
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ cloudlink-common ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cloudlink-emulator: Debug emulators 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ cloudlink-emulator ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ cloudlink-emulator ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ cloudlink-emulator ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/CloudLink/Cloudlink_SecureVM_SonarQube_Scanning/cloudlink-emulator/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ cloudlink-emulator ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cloudlink-emulator ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ cloudlink-emulator ---
[INFO] Building jar: /var/lib/jenkins/workspace/CloudLink/Cloudlink_SecureVM_SonarQube_Scanning/cloudlink-emulator/target/cloudlink-emulator.jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cloudlink-engine: Business logic and DB access tier 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.safenetinc:luna:jar:10.3.0 is missing, no dependency information available
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ cloudlink-engine ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Copying 31 resources
[INFO] Copying 2 resources
[INFO] Copying 10 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ cloudlink-engine ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ cloudlink-engine ---
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/jenkins/workspace/CloudLink/Cloudlink_SecureVM_SonarQube_Scanning/cloudlink-engine/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ cloudlink-engine ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ cloudlink-engine ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ cloudlink-engine ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building cloudlink-web: CloudLink Web Center 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- frontend-maven-plugin:0.0.22:install-node-and-npm (install node and npm) @ cloudlink-web ---
[INFO] Node v0.12.0 is already installed.
[INFO] Found NPM version 2.5.0
[INFO]
[INFO] --- frontend-maven-plugin:0.0.22:npm (npm install) @ cloudlink-web ---
[INFO] Running 'npm install --color=false' in /var/lib/jenkins/workspace/CloudLink/Cloudlink_SecureVM_SonarQube_Scanning/cloudlink-web/src/main/uisrc
[INFO]
[INFO] > cloudlink-web@5.5.0 install /var/lib/jenkins/workspace/CloudLink/Cloudlink_SecureVM_SonarQube_Scanning/cloudlink-web/src/main/uisrc
[INFO] > node install.js
[INFO]
[INFO] -- Compiling LESS to CSS...
[INFO] -- Executing: lessc --clean-css=advanced --include-path=="./styles" ./styles/cloudlink.less ./styles/cloudlink.css
[INFO] -- Done
[INFO] -- Compiling JS...
[INFO] -- Getting list of source files... 96 files found
[INFO] -- Executing: java -jar ../../../../tools/google-closure/compiler.jar --summary_detail_level=3 --js=./scripts/modules/util/templates.js --js=./scripts/app.js --js=./scripts/navigation.js --js=./scripts/alarms.js --js=./scripts/modules/config/config.js --js=./scripts/modules/rest/rest.js --js=./scripts/modules/util/transforms.js --js=./scripts/modules/util/util.js --js=./scripts/modules/util/shared.js --js=./scripts/modules/util/restrictions.js --js=./scripts/modules/table/table.js --js=./scripts/modules/table/summary_table.js --js=./scripts/modules/notifications/notifications.js --js=./scripts/modules/modal/modal.js --js=./scripts/modules/buttons/buttons.js --js=./scripts/modules/summary/summary.js --js=./scripts/modules/upload/upload.js --js=./scripts/modules/progress/progress.js --js=./scripts/modules/popover/popover.js --js=./scripts/modules/tooltip/tooltip.js --js=./scripts/modules/datepicker/datepicker.js --js=./scripts/modules/listbox/listbox.js --js=./scripts/modules/dynamicinput/dynamicinput.js --js=./scripts/modules/graph/graph.js --js=./scripts/modules/draggable/draggable.js --js=./scripts/modules/auth/auth.js --js=./scripts/modules/auth/LoginController.js --js=./scripts/modules/websocket/websocket.js --js=./scripts/monitoring.js --js=./scripts/CloudlinkController.js --js=./scripts/modules/ui/home.js --js=./scripts/modules/ui/securevm/securevm.js --js=./scripts/modules/ui/securevm/vms.js --js=./scripts/modules/ui/securevm/vmgroups.js --js=./scripts/modules/ui/securevm/keyhistory.js --js=./scripts/modules/ui/securevm/config.js --js=./scripts/modules/ui/securevm/svmdownload.js --js=./scripts/modules/ui/certificate/certificatemanagement.js --js=./scripts/modules/ui/certificate/certificates.js --js=./scripts/modules/ui/certificate/certificategroups.js --js=./scripts/modules/ui/kmip/kmip.js --js=./scripts/modules/ui/kmip/server.js --js=./scripts/modules/ui/kmip/partitions.js --js=./scripts/modules/ui/kmip/clients.js --js=./scripts/modules/ui/kmip/objects.js --js=./scripts/modules/ui/kubernetes/kubernetes.js --js=./scripts/modules/ui/kubernetes/info.js --js=./scripts/modules/ui/kubernetes/downloads.js --js=./scripts/modules/ui/kubernetes/clusters.js --js=./scripts/modules/ui/kubernetes/nodes.js --js=./scripts/modules/ui/kubernetes/volumes.js --js=./scripts/modules/ui/location/location.js --js=./scripts/modules/ui/location/providers.js --js=./scripts/modules/ui/location/groups.js --js=./scripts/modules/ui/location/sockets.js --js=./scripts/modules/ui/monitoring/monitoring.js --js=./scripts/modules/ui/monitoring/alarms.js --js=./scripts/modules/ui/monitoring/MonitoringController.js --js=./scripts/modules/ui/monitoring/userssessions.js --js=./scripts/modules/ui/monitoring/usage.js --js=./scripts/modules/ui/monitoring/diagnostics.js --js=./scripts/modules/ui/monitoring/eventhistory.js --js=./scripts/modules/ui/configuration/configuration.js --js=./scripts/modules/ui/configuration/lockbox.js --js=./scripts/modules/ui/configuration/backup.js --js=./scripts/modules/ui/configuration/users.js --js=./scripts/modules/ui/configuration/roles.js --js=./scripts/modules/ui/configuration/cluster.js --js=./scripts/modules/ui/configuration/keystore.js --js=./scripts/modules/ui/configuration/keys.js --js=./scripts/modules/ui/configuration/alarmsconfiguration.js --js=./scripts/modules/ui/configuration/vercontrol.js --js=./scripts/modules/ui/configuration/license-controllers.js --js=./scripts/modules/ui/configuration/adconfig.js --js=./scripts/modules/ui/configuration/secureid.js --js=./scripts/modules/ui/configuration/session.js --js=./scripts/modules/ui/configuration/email.js --js=./scripts/modules/ui/serverconfiguration/serverconfiguration.js --js=./scripts/modules/ui/serverconfiguration/syslog.js --js=./scripts/modules/ui/serverconfiguration/network.js --js=./scripts/modules/ui/serverconfiguration/dns.js --js=./scripts/modules/ui/serverconfiguration/dhcp.js --js=./scripts/modules/ui/serverconfiguration/webssl.js --js=./scripts/modules/ui/serverconfiguration/time.js --js=./scripts/modules/ui/serverconfiguration/snmp.js --js=./scripts/modules/ui/about/about.js --js=./scripts/modules/ui/about/secureConfigSummary.js --js=./scripts/modules/ui/about/restDocumentation.js --js=./scripts/modules/ui/about/loginBanner.js --js=./scripts/modules/ui/debug/debug.js --js=./scripts/modules/ui/debug/sql.js --js=./scripts/modules/ui/debug/keys.js --js=./scripts/modules/ui/debug/files.js --js=./scripts/modules/ui/debug/shell.js --js=./scripts/modules/ui/debug/beta.js --js=./scripts/modules/ui/debug/properties.js --js_output_file=./scripts/cloudlink.js --create_source_map=./scripts/cloudlink.js.map --output_wrapper_file=./closure-output-wrapper.js
[ERROR] ./scripts/modules/ui/about/secureConfigSummary.js:901: WARNING - Keywords and reserved words are not allowed as unquoted property names in older versions of JavaScript. If you are targeting newer versions of JavaScript, set the appropriate language_in option.
[ERROR] default: new docx.Footer({
[ERROR] ^
[ERROR]
[ERROR] ./scripts/modules/ui/configuration/license-controllers.js:125: WARNING - Keywords and reserved words are not allowed as unquoted property names in older versions of JavaScript. If you are targeting newer versions of JavaScript, set the appropriate language_in option.
[INFO] -- Done
[INFO] -- Copying artifacts to ../webapp/
[INFO] -- -- Copying ./libs/angular/release to ../webapp/libs/angular
[ERROR] clRest.licensePool.delete({ 'license_id': $scope.selectedLicenseId }, onSuccess, function (response)
[ERROR] ^
[ERROR]
[ERROR] ./scripts/modules/ui/securevm/svmdownload.js:64: WARNING - unreachable code
[ERROR] return promise.promise;
[ERROR] ^
[ERROR]
[ERROR] 0 error(s), 3 warning(s)
NodeJs plugin is installed in Jenkins and Configured in Jenkins. Could you please help to resolve the issue.
Thanks in advance,
Bunty