forked from NileshVirkar/githubdemo
-
Notifications
You must be signed in to change notification settings - Fork 0
Pr1 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Preeti8600
wants to merge
183
commits into
07f2_old
Choose a base branch
from
pr1
base: 07f2_old
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Pr1 #2
Changes from all commits
Commits
Show all changes
183 commits
Select commit
Hold shift + click to select a range
2213cb0
added tests
NileshVirkar 84e01dd
added tests
NileshVirkar e46a6f5
added tests
NileshVirkar cc29f08
added tests
NileshVirkar c65b092
added tests
NileshVirkar b675f68
Changed clover version to open Clover
NileshVirkar 5cc51f7
uploaded gammascan
NileshVirkar c562c19
Rename gammascan_cpp.json to .gammascan.json
NileshVirkar f35c55b
Update .gammascan.json
NileshVirkar fcb8c47
Update .gammascan.json
NileshVirkar 7f03480
Update .gammascan.json
NileshVirkar 91125e2
Update .gammascan.json
NileshVirkar f266377
Update .gammascan.json
NileshVirkar 6598df9
Update .gammascan.json
NileshVirkar c0f1808
Update .gammascan.json
NileshVirkar ae0f744
Added spotbugs
NileshVirkar 16b35bf
Merge branch 'master' of https://github.com/NileshVirkar/githubdemo
NileshVirkar 1537fbc
updated code
NileshVirkar fec4493
Update .gammascan.json
NileshVirkar 97f9b5d
Update .gammascan.json
NileshVirkar 7a265a8
Update .gammascan.json
NileshVirkar 90a28f7
Rename .gammascan.json to gammascan.json
NileshVirkar 4bb1f83
Update gammascan.json
NileshVirkar 35e96e6
Rename gammascan.json to .gammascan.json
vikrant-phadtare1101 7213128
Merge pull request #1 from vikrant-phadtare1101/patch-1
NileshVirkar 5a9b03d
Update .gammascan.json
NileshVirkar b00a363
Add files via upload
NileshVirkar caaa863
Added nested structure
NileshVirkar b8c89f6
changes
NileshVirkar 1d858b6
Added new code issues
NileshVirkar 4300060
Update .gammascan.json
NileshVirkar 8f59192
Update DemoSubproject.java
NileshVirkar d3f3146
Update .gammascan.json
NileshVirkar d52eaf6
commit
NileshVirkar 56fcc4a
Merge branch 'master' of https://github.com/NileshVirkar/githubdemo
NileshVirkar 056dc0d
commit
NileshVirkar e2aaec1
commit
NileshVirkar fe32106
commit
NileshVirkar ce452a2
commit
NileshVirkar 4ec3ec0
commit
NileshVirkar b81042c
commit
NileshVirkar b34d5ac
commit
NileshVirkar 8208283
commit
NileshVirkar b6b5a33
commit2 [force_commit]
NileshVirkar 05d8e23
commit2
NileshVirkar 7af6def
commit2
NileshVirkar 45228a5
commit2 [force_commit]
NileshVirkar ee998b5
commit2 [gamma_force_commit]
NileshVirkar a4fba29
commit2 [gamma_force_commit]
NileshVirkar 70b5be9
commit2 [gamma_force_commit]
NileshVirkar dce0d36
commit2 [gamma_force_commit]
NileshVirkar 52b6a3f
commit_message
NileshVirkar 73a5166
commit_message
NileshVirkar edcd3a7
commit_message [gamma_force_commit]
NileshVirkar 711171a
commit_message
NileshVirkar bab8065
commit_message
NileshVirkar a74d7e5
commit_message [gamma_force_commit]
NileshVirkar 6bd6bf8
commit_message
NileshVirkar 027b85a
commit_message
NileshVirkar e4100c1
commit_message
NileshVirkar 778df41
commit_message
NileshVirkar 09b8d2d
commit_message
NileshVirkar c9914ef
commit_message [gamma_force_commit]
NileshVirkar 73b151f
commit_message
NileshVirkar acd43cc
message
NileshVirkar 5c3df4e
message
NileshVirkar 36d2ced
message
NileshVirkar 92fef21
commit message
NileshVirkar 6d2ea41
commit message
NileshVirkar c376973
k
NileshVirkar e3fc7b0
commit message
NileshVirkar 8d4db51
k
NileshVirkar a9a0a94
commit
NileshVirkar 1843ba0
commit message [gamma_force_commit]
NileshVirkar 434e7e2
commit message [gamma_force_commit]
NileshVirkar 8b1f8bb
commit message [gamma_force_commit]
NileshVirkar a2fba39
commit
NileshVirkar c9bc76e
commit message
NileshVirkar a43c885
commit message
NileshVirkar 301dec6
commit message [gamma_force_commit]
NileshVirkar 41f6ad9
commit1
NileshVirkar 2bef894
commit2
NileshVirkar 20532ee
commit3
NileshVirkar bf8cee8
commit
NileshVirkar 00897dc
commit_21_8
NileshVirkar 8f360af
commit 21_12
NileshVirkar acdc550
commit 21_13
NileshVirkar ccc7873
added threading issue
NileshVirkar a66e7ab
Fixed sysout issue
NileshVirkar 1a997a2
branch1 commit
NileshVirkar 9e26a1e
commit
NileshVirkar e261981
hope this works
NileshVirkar fd0c61e
this gotta work
NileshVirkar 8e442d4
Update .gammascan.json
NileshVirkar 0e8af64
added dependencies
NileshVirkar 7cc167c
added ci
NileshVirkar dceeb7e
added ci2
NileshVirkar 2d7f775
added ci2
NileshVirkar a430720
fixed ci
NileshVirkar cf7903a
changed issue
NileshVirkar 31d2655
commit
NileshVirkar 1901a05
commit k
NileshVirkar 06fd9de
added file
NileshVirkar 17f787c
changes from github
NileshVirkar 3e30f0f
text
NileshVirkar c62bb2a
text
NileshVirkar 88cb2bb
text
NileshVirkar 87ece96
Update DemoSubproject2.java
NileshVirkar de1a751
Update DemoSubproject2.java
NileshVirkar bf07d0d
text
NileshVirkar 1e195a9
text
NileshVirkar 6d2d538
text
NileshVirkar e99a0c1
text
NileshVirkar dd50fe8
text
NileshVirkar 09b1217
text
NileshVirkar a3a10fa
junit tests
NileshVirkar 427909a
junit tests
NileshVirkar a1895b1
Update .gammascan.json
NileshVirkar 85c69e4
Create readme.md
NileshVirkar dea675d
Delete 1.xml
NileshVirkar e5fec71
test upadtes
NileshVirkar 76b60e9
Merge branch 'master' of https://github.com/NileshVirkar/githubdemo
NileshVirkar 73cf749
Update DemoSubprojectCopy.java
NileshVirkar 6a57e8f
Update DemoTest.java
NileshVirkar 59913b2
Update AppTest.java
NileshVirkar e6bf8d4
Update AppTest.java
NileshVirkar 68e8fbe
Update DemoTest.java
NileshVirkar 55033d0
Update .gammascan.json
NileshVirkar ca5e7b3
Update .gammascan.json
NileshVirkar 51a67f2
Update DemoTest.java
NileshVirkar 0ce4c9a
Update DemoTest.java
NileshVirkar 8c5d0b9
Update DemoTest.java
NileshVirkar 4f4a39f
Update DemoSubproject2.java
NileshVirkar d8531f1
Update DemoSubproject.java
NileshVirkar 28e542f
Update DemoSubproject2.java
NileshVirkar 7e5cdb7
Update DemoSubproject2.java
NileshVirkar 00434af
commit
NileshVirkar 67f52d9
Create embold.json
NileshVirkar f4d7f07
Update embold.json
NileshVirkar 874dfd0
Update embold.json
NileshVirkar 9f6f6f7
Update embold.json
NileshVirkar d590dc5
Update DemoSubprojectCopy.java
NileshVirkar e95e8f3
Update App.java
NileshVirkar f0e08b7
Update embold.json
NileshVirkar 5e849ac
Rename embold.json to emboldk.json
NileshVirkar 255ef44
Update and rename emboldk.json to embold.json
NileshVirkar d815493
Rename embold.json to emboldk.json
NileshVirkar afad814
Update and rename emboldk.json to embold.json
NileshVirkar ce521d1
Update embold.json
NileshVirkar d676880
Update embold.json
NileshVirkar 00a5dca
Update embold.json
NileshVirkar ca71952
Update embold.json
NileshVirkar 4b74286
Update embold.json
NileshVirkar 7c73177
Update embold.json
NileshVirkar 0c8f876
Update embold.json
NileshVirkar 358aa5e
Update embold.json
NileshVirkar bc7a504
Update embold.json
NileshVirkar 3029325
Update embold.json
NileshVirkar e097981
Update embold.json
NileshVirkar f87a1d8
Update embold.json
NileshVirkar 9618aca
Update embold.json
NileshVirkar 41096d4
Update embold.json
NileshVirkar e49eef1
Update embold.json
NileshVirkar bcf652d
Rename embold.json to embold_k.json
NileshVirkar 2d2e019
Update .gammascan.json
NileshVirkar ecc60f8
Update .gammascan.json
NileshVirkar c9f86f2
Update .gammascan.json
NileshVirkar 701e323
Update .gammascan.json
NileshVirkar 69cbbcb
Update .gammascan.json
NileshVirkar 5e08e42
Update .gammascan.json
NileshVirkar a20d607
Update .gammascan.json
NileshVirkar d34fa55
Update .gammascan.json
NileshVirkar 9c9e332
Update .gammascan.json
NileshVirkar fe20714
Update .gammascan.json
NileshVirkar 20cd299
Update .gammascan.json
NileshVirkar 7f2e358
Update .gammascan.json
NileshVirkar 3df3f4b
Update .gammascan.json
NileshVirkar 2e7b999
Update .gammascan.json
NileshVirkar b845bdd
Update DemoSubproject2.java
NileshVirkar 3682515
compilation error
NileshVirkar 002ff2a
Update DemoSubproject2.java
NileshVirkar 4d0af0e
Update DemoSubproject2.java
NileshVirkar 7e2fe0f
Add files via upload
Preeti8600 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| { | ||
| "gammaAccess": { | ||
| "url": "", | ||
| "userName": "", | ||
| "password": "" | ||
| }, | ||
| "repositories": [ | ||
| { | ||
| "dataDir": "$WORKSPACE/temptk8", | ||
| "repository": { | ||
| "uid": "f1c3abdc163ec17ed10f0415fa1b967b", | ||
| "projectName": "githubdemo_jenkins", | ||
| "languages": [ | ||
| "JAVA" | ||
| ], | ||
| "sources": { | ||
| "baseDir": "$WORKSPACE", | ||
| "exclusions": [] | ||
| } | ||
| }, | ||
| "settings": { | ||
| "additionalOptions": [], | ||
| "includePaths": [] | ||
| }, | ||
| "modules": { | ||
| "codeissues": [ | ||
| { | ||
| "name": "gamma_java", | ||
| "enabled": true, | ||
| "config": { | ||
| "rules": [], | ||
| "options": [] | ||
| } | ||
| }, | ||
| { | ||
| "name": "pmd", | ||
| "enabled": true, | ||
| "config": { | ||
| "rules": [], | ||
| "options": [ | ||
| { | ||
| "name": "javaVersion", | ||
| "type": "text", | ||
| "value": "1.8", | ||
| "required": false | ||
| }, | ||
| { | ||
| "name": "ruleSets", | ||
| "type": "text", | ||
| "value": "rulesets/java/strictexception.xml,rulesets/java/basic.xml,rulesets/java/design.xml", | ||
| "required": true | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ], | ||
| "unittest": [ | ||
| { | ||
| "name": "junit", | ||
| "enabled": true, | ||
| "config": { | ||
| "rules": [], | ||
| "options": [ | ||
| { | ||
| "name": "reportDir", | ||
| "type": "upload", | ||
| "value": "", | ||
| "required": true | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #!/bin/bash | ||
| #check Embold is disable | ||
| commit_msg=$(cat "${1:?Missing commit message file}") | ||
| commit_msg=$(echo "$commit_msg" | tr '[:upper:]' '[:lower:]') | ||
| if [[ $commit_msg == *"embold --skip"* ]]; then | ||
| echo "Embold Gated commit disable" | ||
| echo "[Embold Gated commit disabled]" >> $1 | ||
| exit 0 | ||
| fi | ||
| #check CORONA_HOME is not empty | ||
| corona_home=$CORONA_HOME | ||
| if [[ -z "$corona_home" ]] | ||
| then | ||
| exit 1 | ||
| fi | ||
| #check if merge commit | ||
| hash=`git rev-parse -q --verify MERGE_HEAD` | ||
| if [[ ! -z "$hash" ]] | ||
| then | ||
| exit 0 | ||
| fi | ||
| random_str=`(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 10 ; echo '')` | ||
| temp_dir=$corona_home/temp/$random_str | ||
| mkdir -p $temp_dir | ||
| echo "Embold Analysis started, Please wait..." | ||
| current_dir=$(pwd) | ||
| pluginxml=$corona_home/coronacli/config/plugins_empty.xml | ||
| $corona_home/coronacli/bin/coronacli -b "$current_dir" -c "$current_dir" -d "$temp_dir" -r "git" -p $pluginxml -g -lc > $corona_home/temp/gated_commit.log | ||
| quality_gate_output_file=$temp_dir/GatedCommit/quality_gate_output.txt | ||
| if [ ! -e $quality_gate_output_file ] | ||
| then | ||
| echo "Embold Analysis Failed" | ||
| exit 0 | ||
| fi | ||
| var=`cat $quality_gate_output_file | grep Status` | ||
| status=`echo "$var" | cut -c 8-` | ||
| if [[ "$status" == "pass" ]] | ||
| then | ||
| echo "[Embold Quality Gate:Passed]" >> $1 | ||
| rm -r $temp_dir | ||
| exit 0 | ||
| elif [ "$status" == "warning" ] | ||
| then | ||
| echo "[Embold Quality Gate:Passed]" >> $1 | ||
| while read line; do | ||
| echo $line | ||
| done < $quality_gate_output_file | ||
| rm -r $temp_dir | ||
| exit 0 | ||
| elif [ "$status" == "EmboldFailed" ] | ||
| then | ||
| echo "[Embold Analysis failed]" >> $1 | ||
| while read line; do | ||
| echo $line | ||
| done < $quality_gate_output_file | ||
| rm -r $temp_dir | ||
| exit 0 | ||
| else | ||
| if [[ $commit_msg == *"embold --force-commit"* ]]; then | ||
| echo "Embold Quality Gate:Failed" | ||
| echo "[Embold Quality Gate:Failed]" >> $1 | ||
| status_flag=false | ||
| while read line; do | ||
| if [ "$status_flag" = true ] ; then | ||
| echo $line >> $1 | ||
| fi | ||
| if [ "$status_flag" = false ] ; then | ||
| status_flag=true | ||
| fi | ||
| done < $quality_gate_output_file | ||
| rm -r $temp_dir | ||
| exit 0 | ||
| else | ||
| echo "Embold Quality Gate:Failed" | ||
| echo "Commit Status: Rejected" | ||
| status_flag=false | ||
| while read line; do | ||
| if [ "$status_flag" = true ] ; then | ||
| echo $line | ||
| fi | ||
| if [ "$status_flag" = false ] ; then | ||
| status_flag=true | ||
| fi | ||
| done < $quality_gate_output_file | ||
| rm -r $temp_dir | ||
| exit 1 | ||
| fi | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /target/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| package com.mariten.kanatools; | ||
|
|
||
| import com.sun.org.slf4j.internal.LoggerFactory; | ||
|
|
||
| import javax.crypto.Cipher; | ||
| import javax.crypto.NoSuchPaddingException; | ||
| import java.io.BufferedWriter; | ||
| import java.io.FileWriter; | ||
| import java.io.IOException; | ||
| import java.io.PrintWriter; | ||
| import java.security.NoSuchAlgorithmException; | ||
| import java.security.SecureRandom; | ||
|
|
||
| public class ResourceLeak { | ||
| private boolean active; | ||
| public void setActive(boolean b) | ||
| { | ||
| this.active = b; | ||
| } | ||
|
|
||
| LoggerFactory logger = new LoggerFactory(); | ||
| String count; | ||
| public void process() { | ||
| SecureRandom secureRandom = new SecureRandom(); | ||
| System.runFinalizersOnExit(true); | ||
| try { | ||
| PrintWriter out = new PrintWriter(""); | ||
| out.println("the text"); | ||
| System.out.println(""); | ||
| System.out.println(""); | ||
| out.close(); | ||
| Cipher c1 = Cipher.getInstance("DES"); | ||
| } catch (IOException | NoSuchAlgorithmException | NoSuchPaddingException e) { | ||
| System.err.println(); | ||
| System.err.println(); | ||
|
|
||
|
|
||
|
|
||
| } | ||
|
|
||
| } | ||
| public void process2() { | ||
| try { | ||
| PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("out.txt", true))); | ||
| out.println("the text"); | ||
| } catch (IOException e) { | ||
| logger.error("Resource is not closed anywhere.",e); | ||
| } | ||
| } | ||
|
|
||
|
|
||
| public void demo(String name, String surName,String count,String preeti) { | ||
| String surName = surName; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I detect that this code is problematic. According to the Dodgy code (STYLE), SA: Self assignment of local variable (SA_LOCAL_SELF_ASSIGNMENT). |
||
| name = name; | ||
| this.count = count; | ||
| preeti += preeti; | ||
| preeti = preeti; | ||
| r += r; | ||
| } | ||
| public void method() { | ||
| Thread myThread = new Thread(); | ||
| // EMB-ISSUE: CodeIssueNames.RUN_SHOULD_NOT_BE_CALLED_DIRECTLY | ||
| myThread.run(); | ||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| ticket subproject/src/main/java/subproject/DemoSubproject.java | ||
| ticket subproject/src/main/java/subproject/DemoSubproject.java |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I detect that this code is problematic. According to the Bad practice (BAD_PRACTICE), Dm: Method invokes dangerous method runFinalizersOnExit (DM_RUN_FINALIZERS_ON_EXIT).
Never call System.runFinalizersOnExit or Runtime.runFinalizersOnExit for any reason: they are among the most dangerous methods in the Java libraries. -- Joshua Bloch