Skip to content

Commit c3c90e2

Browse files
authored
created CircleCI config for sonar analysis (iluwatar#1664)
* created sonar config iluwatar#1663 * updated license headers * xvfb to run tests * updated circle image to enable css and JS analysis
1 parent 268e414 commit c3c90e2

File tree

11 files changed

+98
-34
lines changed

11 files changed

+98
-34
lines changed

.circleci/config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#
2+
# The MIT License
3+
# Copyright © 2014-2021 Ilkka Seppälä
4+
#
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
#
12+
# The above copyright notice and this permission notice shall be included in
13+
# all copies or substantial portions of the Software.
14+
#
15+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
# THE SOFTWARE.
22+
#
23+
24+
version: 2
25+
26+
jobs:
27+
sonar-pr:
28+
docker:
29+
- image: circleci/openjdk:11-node
30+
steps:
31+
- checkout
32+
- restore_cache:
33+
key: jdp-sonar-pr-{{ checksum "pom.xml" }}
34+
- run: |
35+
if [ -n "${CIRCLE_PR_NUMBER}" ]; then
36+
MAVEN_OPTS="-Xmx3000m" xvfb-run ./mvnw -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
37+
-Dsonar.pullrequest.key=${CIRCLE_PR_NUMBER} \
38+
-Dsonar.pullrequest.branch=${CIRCLE_BRANCH} \
39+
-Dsonar.pullrequest.base=master
40+
else
41+
echo "No Sonar PR analysis as this is not a pull request"
42+
fi
43+
- save_cache:
44+
key: jdp-sonar-pr-{{ checksum "pom.xml" }}
45+
paths:
46+
- ~/.m2
47+
48+
workflows:
49+
version: 2
50+
all:
51+
jobs:
52+
- sonar-pr

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
/*
2-
* Copyright 2007-present the original author or authors.
2+
* The MIT License
3+
* Copyright © 2014-2021 Ilkka Seppälä
34
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
711
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
914
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
1522
*/
23+
1624
import java.net.*;
1725
import java.io.*;
1826
import java.nio.channels.*;

mvnw.cmd

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
@REM ----------------------------------------------------------------------------
2-
@REM Licensed to the Apache Software Foundation (ASF) under one
3-
@REM or more contributor license agreements. See the NOTICE file
4-
@REM distributed with this work for additional information
5-
@REM regarding copyright ownership. The ASF licenses this file
6-
@REM to you under the Apache License, Version 2.0 (the
7-
@REM "License"); you may not use this file except in compliance
8-
@REM with the License. You may obtain a copy of the License at
91
@REM
10-
@REM http://www.apache.org/licenses/LICENSE-2.0
2+
@REM The MIT License
3+
@REM Copyright © 2014-2021 Ilkka Seppälä
4+
@REM
5+
@REM Permission is hereby granted, free of charge, to any person obtaining a copy
6+
@REM of this software and associated documentation files (the "Software"), to deal
7+
@REM in the Software without restriction, including without limitation the rights
8+
@REM to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
@REM copies of the Software, and to permit persons to whom the Software is
10+
@REM furnished to do so, subject to the following conditions:
11+
@REM
12+
@REM The above copyright notice and this permission notice shall be included in
13+
@REM all copies or substantial portions of the Software.
14+
@REM
15+
@REM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
@REM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
@REM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
@REM AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
@REM LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
@REM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
@REM THE SOFTWARE.
1122
@REM
12-
@REM Unless required by applicable law or agreed to in writing,
13-
@REM software distributed under the License is distributed on an
14-
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
@REM KIND, either express or implied. See the License for the
16-
@REM specific language governing permissions and limitations
17-
@REM under the License.
18-
@REM ----------------------------------------------------------------------------
1923

2024
@REM ----------------------------------------------------------------------------
2125
@REM Maven Start Up Batch script

parameter-object/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<!--
33
44
The MIT License
5-
Copyright © 2014-2019 Ilkka Seppälä
5+
Copyright © 2014-2021 Ilkka Seppälä
66
77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

parameter-object/src/main/java/com/iluwatar/parameter/object/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License
3-
* Copyright © 2014-2019 Ilkka Seppälä
3+
* Copyright © 2014-2021 Ilkka Seppälä
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

parameter-object/src/main/java/com/iluwatar/parameter/object/ParameterObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License
3-
* Copyright © 2014-2019 Ilkka Seppälä
3+
* Copyright © 2014-2021 Ilkka Seppälä
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

parameter-object/src/main/java/com/iluwatar/parameter/object/SearchService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License
3-
* Copyright © 2014-2019 Ilkka Seppälä
3+
* Copyright © 2014-2021 Ilkka Seppälä
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

parameter-object/src/main/java/com/iluwatar/parameter/object/SortOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License
3-
* Copyright © 2014-2019 Ilkka Seppälä
3+
* Copyright © 2014-2021 Ilkka Seppälä
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

parameter-object/src/test/java/com/iluwatar/parameter/object/AppTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License
3-
* Copyright © 2014-2019 Ilkka Seppälä
3+
* Copyright © 2014-2021 Ilkka Seppälä
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

parameter-object/src/test/java/com/iluwatar/parameter/object/ParameterObjectTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License
3-
* Copyright © 2014-2019 Ilkka Seppälä
3+
* Copyright © 2014-2021 Ilkka Seppälä
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

parameter-object/src/test/java/com/iluwatar/parameter/object/SearchServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* The MIT License
3-
* Copyright © 2014-2019 Ilkka Seppälä
3+
* Copyright © 2014-2021 Ilkka Seppälä
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)