Skip to content
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

Branch with issues #6 #6

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3b72c45
add quality issues to code branch
Jan 30, 2020
7971770
add branch name to pipeline mvn cmd
Jan 30, 2020
c920aec
master branch condition in JenkinsFile
Jan 30, 2020
88dfc06
report JenkinsFile fix done on master
Jan 31, 2020
b35b56e
fixed locked unitary tests
Feb 4, 2020
ebdcd17
try to dump JenkinsFile env
Feb 4, 2020
30eba7d
try to dump JenkinsFile env 2
Feb 4, 2020
25a0ec1
try to dump JenkinsFile env 3
Feb 4, 2020
ee8d1c4
try to build PR analysis
Feb 4, 2020
23c82b2
try to build PR analysis 2
Feb 4, 2020
104e426
try to build PR analysis 3
Feb 4, 2020
07c680b
try to build PR analysis 4
Feb 4, 2020
465abcd
try to build PR analysis 5
Feb 4, 2020
b923272
try to build PR analysis 6
Feb 4, 2020
dc1d6f1
Revert "try to build PR analysis 6"
Feb 4, 2020
906dd5e
Merge branch 'master' into branch_with_issues
sylvain-combe-sonarsource Feb 4, 2020
f4e1219
Add fetch of master for sonar scanner comparison
sylvain-combe-sonarsource Feb 28, 2020
1df2a08
change docker image
sylvain-combe-sonarsource Feb 28, 2020
35a8e79
Fix JenkinsFile conflict
Feb 28, 2020
ea7bdd4
Align Jenkinsfile on master branch one
sylvain-combe-sonarsource Apr 22, 2020
1c73901
Back to branch and PT analysis parameters
sylvain-combe-sonarsource Apr 22, 2020
e920809
Fix git branch and PR code analyzed
sylvain-combe-sonarsource Apr 22, 2020
b6eb4cf
need git commands again in docker container
sylvain-combe-sonarsource Apr 22, 2020
3093490
do I need a git command at all
sylvain-combe-sonarsource Apr 22, 2020
57aab0f
align project keys
Apr 22, 2020
a252228
resolve conflict on pom.xml
Apr 22, 2020
432b746
add quality gate status check
Apr 22, 2020
7c4de5d
new attempt with no analysis parameter
Apr 22, 2020
03b6fcf
add cache for plugins
Apr 22, 2020
544d798
use volume mount for caches
Apr 22, 2020
abed2e3
mandatory parameters back
Apr 22, 2020
e1e37c1
user home tweaks
Apr 22, 2020
c9a4c10
fix args
Apr 22, 2020
2f5f359
HOME not existing
Apr 22, 2020
b6576cd
root be it
Apr 22, 2020
78752e5
root be it 2
Apr 22, 2020
f6f69d7
remove git url not found anymore in SCM step
Apr 23, 2020
60718d6
Create azure-pipelines.yml
sylvain-combe-sonarsource Mar 16, 2021
2f9ffa2
Update azure-pipelines.yml for Azure Pipelines
sylvain-combe-sonarsource Mar 16, 2021
bfb1408
Update App.java
sylvain-combe-sonarsource Mar 16, 2021
e0a3df7
Update azure-pipelines.yml
sylvain-combe-sonarsource Mar 16, 2021
35de2e3
Update azure-pipelines.yml
sylvain-combe-sonarsource Mar 16, 2021
7796386
Update App.java
sylvain-combe-sonarsource Mar 16, 2021
cac4814
Merge branch 'master' into branch_with_issues
sylvain-combe-sonarsource Mar 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@

trigger:
- master
- branch*
- feature*
pr:
- master
- releases/*
- br*
- feature*

pool:
vmImage: ubuntu-latest
Expand All @@ -33,12 +36,14 @@ steps:
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'clean package sonar:sonar'

- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
# Write your PowerShell commands here.
Start-Sleep -Seconds 20
Start-Sleep -Seconds 1

- task: SonarQubePublish@4
inputs:
pollingTimeoutSec: '300'
pollingTimeoutSec: '300'
16 changes: 16 additions & 0 deletions my-app.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
</component>
</module>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!--sonar.projectKey>sylvain-combe-sonarsource_simple-java-maven-app</sonar.projectKey>
<sonar.projectKey>sylvain-combe-sonarsource_simple-java-maven-app</sonar.projectKey>
<sonar.organization>sylvain-combe-sonarsource</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.login>d58f0d63d88254491a09164a0deb397298a99f6e</sonar.login-->
<sonar.login>d58f0d63d88254491a09164a0deb397298a99f6e</sonar.login>

Check failure

Code scanning / SonarCloud

SonarQube tokens should not be disclosed High

Make sure this SonarQube token gets revoked, changed, and removed from the code. See more on SonarCloud
</properties>
</project>
28 changes: 25 additions & 3 deletions src/main/java/com/mycompany/app/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,37 @@ public class App
{

private final String message = "Hello World!";
public String msg1;
public String msg2;

public App() {}

public App() {
msg1 = "one";
msg2="two";
}

public static void main(String[] args) {
System.out.println(new App().getMessage());
App myApp = new App();
try {
System.out.println(myApp.getMessage());
} catch (InterruptedException e) {
e.printStackTrace();
}
}

private final String getMessage(boolean isSync) throws InterruptedException {
synchronized (this.msg1) {
// threadB can't enter this block to request this.mon2 lock & release threadA
synchronized (this.msg2) {
this.msg2.wait(); // Noncompliant; threadA is stuck here holding lock on this.mon1
}
}
return message;
}

private final String getMessage() {
private final String getMessage() throws InterruptedException {
return message;
}


}