Analysing the code using SonarQube Scanner

Step 1:- Download the O/S Specific version from below site
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

Iamge1

Step:-2 Modify sonar-scanner.properties for configuring new project
C:\sonar-scanner-3.0.3.778-windows\conf\sonar-scanner.properties

#Configure here general information about the environment, such as SonarQube DB details for example
#No information about specific project should appear here

#—– Default SonarQube server
sonar.host.url=http://localhost:9000

#—– Default source code encoding
#sonar.sourceEncoding=UTF-8
sonar.projectName=TestSiddhuGWT
sonar.projectVersion=1.0
sonar.sources=C:/GWT-Workspace/rest-api-sample
sonar.projectKey=TestSiddhuGWT

Step 3:- Execute the scanner with below given command in another cmd prompt

C:\sonar-scanner-3.0.3.778-windows\bin>sonar-scanner.bat

Iamge2
And see the resultant information on the screen

Iamge3

Advertisements
Posted in Uncategorized | Leave a comment

SOAP Call using ReactJS

 

First the user click on button having register onClick method onClick={this.callWebservice}

Once user click on the button we make a simple Ajax SOAP call using xmlHttpRequest and onsucess we dispaly the data on pop up window.

 

Image1Image2

Posted in Uncategorized | Leave a comment

Addition of Two value using ReactJS

 

First the user enter the value in the number1 and number2 are the textfield and we had written onChange event on this text field

onChange={(event)=>this.setState({number1:event.target.value})}
onChange={(event)=>this.setState({number2:event.target.value})}

Second the user click on the button and code onClick={this.doAction} is executed.
doAction()
{
this.setState({result : parseInt(this.state.number1) + parseInt(this.state.number2) });
}
Note: Before using any variable we have to declare it inside constructor. We also need to register the action method using this object

 

Add_exxampleImage1

 

 

Posted in Uncategorized | Leave a comment

Installation of ReactJS and Best IDE to use

ReactJS is Facebook generated language with a view to use DOM object of JAVA script for fast operation. IT deals more with Look and Feel i.e. VIEW aspect of the project. It has following advantages:-

– Component base development.
– Support Javascript DOM object and hence speedy in render on screen.
– Support both client and server side (with NodeJS) integration

 

— Installation
Make sure you have both the given below software installed at your machine
node.js and npm.js. We are using following version of node.js:- v6.9.4 and npm -v:-3.10.10

1- Create a folder C:\ReactWorkSpace>
2- Execute this command
C:\ReactWorkSpace>npm install -g create-react-app
3- Create an app
C:\ReactWorkSpace>create-react-app siddhureactapp

C:\ReactWorkSpace>create-react-app siddhureactapp

Creating a new React app in C:\ReactWorkSpace\siddhureactapp.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts…

4- cd siddhureactapp
npm install

5- Final start the npm using below command
npm start

Image1

Best IDE to use for React.
I personally prefer two IDE
1- Sublime text 3
2- Bracket

Note :- Please install follwing plugin in Sublime text 3 before using for React.

Preference –> Package control –>

Image2

 

 

https://github.com/reactjs/sublime-react
https://github.com/SublimeLinter/SublimeLinter-jsxhint
http://emmet.io/

Other option can be exposed from
https://packagecontrol.io/

Posted in Uncategorized | Leave a comment

How to import data from Trello to JIRA

Login to JIRA instance and go to Setting –>System

Image1

Select External System Import option from the left menu

Image2

Image3

Select Trello Option from provided Icon

Image4

click on Next

Image5

Allow to Access Trello

Image6

Select the board we want to import the data.

Image7

 

Image8

Click on next and provide the individual Email address to separate the user.

Image9

Select Set their application access manually

Image10

Select the Check box of JIRA name

Image11

Let the process complete

Image12

Final dialog box displaying the import success

Image13

We can refer to the board imported in JIRA from Project Tab and then select the name of the Trello

Image17

Displaying the list of the board created.

Image14

Displaying the list of task and its status list.

Image15

Trello Screen

Image16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Posted in Uncategorized | Leave a comment

Debugging Java Script in Chrome Browser

  1. Click F12 key
  2. Then Select Sources, tab in the developer tools
  3. Click the Sources Tab and Select your JavaScript file
  4. Add a breakpoint by clicking on the line number on the left (adds a little blue marker)
  5. Execute your JavaScript

Short Cut Key for debugging

  • F8 Continue: Jump  to next breakpoints
  • F10 Step over: Steps over next function call (won’t enter the library)
  • F11 Step into: Steps into the next function call (will enter the library)
  • Shift + F11 Step out: Steps out of the current function
Posted in Uncategorized | Leave a comment

SonarQube for code review

Sonar Qube is code review tool available in market for different language like java,javascript, C#, C, Cobol.
SonarQube is capable enough to show the health of an application and also highlight issues and risk introduced into the project due to new code/existing code merge.. With help of Sonar Qube we can improve code quality systematically.

To use SonarQube we need to follow below given steps. This include setup of SonarQube Server on local Machine along with Eclipse plugin to analysis the code.

 

Step 1:- How to do setup of SonarQube Server on Localhost.
Please refer to https://www.sonarqube.org/#_ and click on Dowload icon and select the latest version of SonarQube. While writing this blog we had 6.5 version as the laterst one. Extract the sonarqube-6.5.zip and move to the bin folder C:\sonarqube-6.5\sonarqube-6.5\bin.

Here we will find many subfolder that contains *.sh and *.bat file to start server in different O/S. As we are using windows-x86-64 move inside C:\sonarqube-6.5\sonarqube-6.5\bin\windows-x86-64 and execute following command.

C:\sonarqube-6.5\sonarqube-6.5\bin\windows-x86-64>StartSonar.bat
…….
jvm 1 | 2017.08.16 13:42:58 INFO app[][o.s.a.SchedulerImpl] SonarQube is up
Above line indicate that our server is started on local host @ port 9000. Cross verify https://localhost:9000 and u will be able to see this screen. Click on Login and use default userid and passwrod admin/admin to get logged into the SonarQube server.

 

Image1Image2
Step 2:- Performing Code Analysing using Eclipse Plug in for SonarLite
As a java developer we generally prefer Eclipse IDE. Eclipse come with many plugin for development one of them is sonar Qube. We can install this plugin from below given loacation
https://marketplace.eclipse.org/content/sonarlint

Once the plugin is installed in the Eclipse restart it and reconfirm successful installtion by checking availability of option Window–>preference->SolarLit

Image3
Step 3:- configure the Sonar server in eclipse
Lets now configure our Local host server inside Eclipse SolanLite Plugin. To do this Create a new SolarQube server using eclipse “File -> New -> Other… -> SonarLint -> New Server”.

Here we had two option
1- Cloude
2- using Local host

Chose option 2 and follow below steps

 

Image5Image4Image6
It will ask you for Token or User+password. If we chose to use Token by generating token from follwing below screen of our localhost SonarQube server.
Image7

Or we can directly use userid and password admin/admin to configure Localhost SonarQube server.

Image8Image9Image10

Step 4:- Run the sonar Plugin and modify the code.

Now we are ready to run the sonarQube code analyser on our code. Right click on the java file and find/modify the leak code .
Image11Image12

Posted in Uncategorized | Leave a comment