Skip to content

Commit 82e66f6

Browse files
committed
Update to better checkstyle
1 parent 54a3bb5 commit 82e66f6

File tree

551 files changed

+708
-641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

551 files changed

+708
-641
lines changed

build.gradle

+9-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ jar {
5252
'Bundle-DocURL': 'https://github.com/akarnokd/RxJavaExtensions')
5353
}
5454

55+
checkstyle {
56+
configFile = project.file("config/checkstyle/checkstyle.xml")
57+
configProperties = [
58+
"checkstyle.suppressions.file": project.file("config/checkstyle/suppressions.xml"),
59+
"checkstyle.header.file" : project.file("config/license/HEADER_JAVA")
60+
]
61+
}
62+
5563
apply plugin: "com.vanniktech.maven.publish"
5664

5765
jmh {
@@ -90,7 +98,7 @@ test {
9098
}
9199

92100
license {
93-
header rootProject.file('HEADER')
101+
header rootProject.file('config/license/HEADER')
94102
ext.year = Calendar.getInstance().get(Calendar.YEAR)
95103
skipExistingHeaders true
96104
ignoreFailures true

config/checkstyle/checkstyle.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
5+
6+
<module name="Checker">
7+
<module name="SuppressionFilter">
8+
<property name="file" value="${checkstyle.suppressions.file}"/>
9+
</module>
10+
11+
<!-- Headers -->
12+
<module name="Header">
13+
<property name="headerFile" value="${checkstyle.header.file}"/>
14+
<property name="fileExtensions" value="java"/>
15+
</module>
16+
17+
<module name="TreeWalker">
18+
<module name="JavadocMethod"/>
19+
<module name="MissingJavadocMethod">
20+
<property name="severity" value="warning"/>
21+
</module>
22+
23+
<module name="RegexpSinglelineJava">
24+
<property name="severity" value="warning"/>
25+
<property name="format" value="^(?!\s+\* $).*?\s+$"/>
26+
<property name="message" value="Line has trailing spaces."/>
27+
</module>
28+
</module>
29+
30+
</module>

config/checkstyle/suppressions.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
3+
<!DOCTYPE suppressions PUBLIC
4+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
5+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
6+
7+
<suppressions>
8+
9+
<suppress checks="MissingJavadocMethod" files="[\\/]main[\\/]java[\\/]hu[\\/]akarnokd[\\/]rxjava3[\\/]internal[\\/]"/>
10+
<suppress checks="MissingJavadocMethod" files="[\\/]jmh[\\/]java[\\/]hu[\\/]akarnokd[\\/]rxjava3[\\/]"/>
11+
<suppress checks="MissingJavadocMethod" files="[\\/]test[\\/]java[\\/]hu[\\/]akarnokd[\\/]rxjava3[\\/]"/>
12+
13+
</suppressions>

HEADER config/license/HEADER

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2016-${year} David Karnok
1+
Copyright 2016-present David Karnok
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

config/license/HEADER_JAVA

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright 2016-present David Karnok
3+
*
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
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
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+
*/

gradle/maven.gradle

-69
This file was deleted.

src/jmh/java/hu/akarnokd/rxjava3/ExamplePerf.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,6 +36,9 @@ public class ExamplePerf {
3636
@Param({"1", "10", "100", "1000", "10000", "100000", "1000000"})
3737
public int count;
3838

39+
/**
40+
* Insert setup code here.
41+
*/
3942
@Setup
4043
public void setup() {
4144

src/jmh/java/hu/akarnokd/rxjava3/FlatMapExPerf.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -71,6 +71,9 @@ public class FlatMapExPerf {
7171

7272
Flowable<Integer> asyncAsyncB;
7373

74+
/**
75+
* Prepare fields.
76+
*/
7477
@Setup
7578
public void setup() {
7679
Integer[] array = new Integer[count];

src/jmh/java/hu/akarnokd/rxjava3/PerfAsyncConsumer.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -69,6 +69,10 @@ public void onComplete() {
6969
countDown();
7070
}
7171

72+
/**
73+
* Wait either via spinning or sleeping.
74+
* @param count how much value is expected to be received
75+
*/
7276
public void await(long count) {
7377
if (count <= 1000) {
7478
while (getCount() != 0) { }

src/jmh/java/hu/akarnokd/rxjava3/PerfConsumer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/AnyValue.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/AsyncFlowable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/AsyncObservable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/DisposableFlowable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/DisposableObservable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/FlowableFromCallableNull.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/FutureCompletable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/ObservableFromSupplierNull.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/async/package-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/BasicEmptyQueueSubscription.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/BasicNonoIntQueueSubscription.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/BasicNonoSubscriber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/BasicRefNonoSubscriber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/BasicRefQueueSubscription.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/BasicSoloQueueSubscription.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/BlockingGetSubscriber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/FuturePerhapsSubscriber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/Nono.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/NonoAmbArray.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/NonoAmbIterable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/NonoAndThen.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/NonoAndThenPublisher.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/NonoBlockingAwaitSubscriber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/NonoCache.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/main/java/hu/akarnokd/rxjava3/basetypes/NonoComplete.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 David Karnok
2+
* Copyright 2016-present David Karnok
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)