Skip to content

Commit 2b12e6d

Browse files
committed
Fix #16: Qodana
1 parent 5482e29 commit 2b12e6d

File tree

43 files changed

+71312
-41
lines changed

Some content is hidden

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

43 files changed

+71312
-41
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'gradle'
4+
directory: '/'
5+
schedule:
6+
interval: 'daily'
7+
assignees:
8+
- madhead
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
assignees:
14+
- madhead

.github/workflows/default.yml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Check Gradle version
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2.3.4
13+
- uses: actions/checkout@v2
1414

1515
- uses: madhead/check-gradle-version@v1
1616
continue-on-error: true
@@ -19,7 +19,7 @@ jobs:
1919
name: Check copyright date
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v2.3.4
22+
- uses: actions/checkout@v2
2323

2424
- run: |
2525
copyright_year=$(sed -n 's/Copyright Ⓒ \([[:digit:]]\{4\}\) madhead <siarhei.krukau@gmail.com>/\1/p' LICENSE)
@@ -29,6 +29,45 @@ jobs:
2929
[[ $copyright_year == $current_year ]]
3030
continue-on-error: true
3131

32+
qodana-license-audit:
33+
name: Qodana license audit
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
38+
- uses: JetBrains/qodana-license-audit-action@v2.0-eap
39+
40+
- uses: actions/upload-artifact@v2
41+
if: always()
42+
with:
43+
retention-days: 1
44+
name: qodana-license-audit
45+
path: ${{ github.workspace }}/qodana
46+
continue-on-error: true
47+
48+
qodana-scan:
49+
name: Qodana scan
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v2
53+
54+
- uses: JetBrains/qodana-action@v4.2.2
55+
with:
56+
upload-result: false
57+
baseline-path: qodana.sarif.json
58+
59+
- uses: github/codeql-action/upload-sarif@v1
60+
with:
61+
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
62+
63+
- uses: actions/upload-artifact@v2
64+
if: always()
65+
with:
66+
retention-days: 1
67+
name: qodana-scan
68+
path: ${{ runner.temp }}/qodana/results
69+
continue-on-error: true
70+
3271
unit-test:
3372
name: Unit test
3473
runs-on: ubuntu-latest
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Qodana baseline
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
qodana-baseline:
10+
name: Qodana baseline
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: JetBrains/qodana-action@v4.2.2
15+
with:
16+
upload-result: false
17+
baseline-path: qodana.sarif.json
18+
- run: |
19+
cp ${{ runner.temp }}/qodana/results/qodana.sarif.json qodana.sarif.json
20+
- uses: stefanzweifel/git-auto-commit-action@v4
21+
with:
22+
commit_message: Update Qodana baseline
23+
file_pattern: qodana.sarif.json

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ configure(
130130
tasks {
131131
register<Javadoc>("javadocs") {
132132
group = "Documentation"
133-
destinationDir = file("$buildDir/docs/javadoc")
134133
title = project.name
134+
setDestinationDir(file("$buildDir/docs/javadoc"))
135135
with(options as StandardJavadocDocletOptions) {
136136
links = listOf(
137137
"https://docs.oracle.com/javase/8/docs/api/",

docs/maven.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,71 +88,85 @@ Specify the dependencies you need as usual:
8888
<groupId>me.madhead.aws-junit5</groupId>
8989
<artifactId>dynamo-v1</artifactId>
9090
<version>{revnumber}</version>
91+
<scope>test</scope>
9192
</dependency>
9293
<dependency>
9394
<groupId>me.madhead.aws-junit5</groupId>
9495
<artifactId>dynamo-v2</artifactId>
9596
<version>{revnumber}</version>
97+
<scope>test</scope>
9698
</dependency>
9799
<dependency>
98100
<groupId>me.madhead.aws-junit5</groupId>
99101
<artifactId>s3-v1</artifactId>
100102
<version>{revnumber}</version>
103+
<scope>test</scope>
101104
</dependency>
102105
<dependency>
103106
<groupId>me.madhead.aws-junit5</groupId>
104107
<artifactId>s3-v2</artifactId>
105108
<version>{revnumber}</version>
109+
<scope>test</scope>
106110
</dependency>
107111
<dependency>
108112
<groupId>me.madhead.aws-junit5</groupId>
109113
<artifactId>kinesis-v1</artifactId>
110114
<version>{revnumber}</version>
115+
<scope>test</scope>
111116
</dependency>
112117
<dependency>
113118
<groupId>me.madhead.aws-junit5</groupId>
114119
<artifactId>kinesis-v2</artifactId>
115120
<version>{revnumber}</version>
121+
<scope>test</scope>
116122
</dependency>
117123
<dependency>
118124
<groupId>me.madhead.aws-junit5</groupId>
119125
<artifactId>sns-v1</artifactId>
120126
<version>{revnumber}</version>
127+
<scope>test</scope>
121128
</dependency>
122129
<dependency>
123130
<groupId>me.madhead.aws-junit5</groupId>
124131
<artifactId>sns-v2</artifactId>
125132
<version>{revnumber}</version>
133+
<scope>test</scope>
126134
</dependency>
127135
<dependency>
128136
<groupId>me.madhead.aws-junit5</groupId>
129137
<artifactId>sqs-v1</artifactId>
130138
<version>{revnumber}</version>
139+
<scope>test</scope>
131140
</dependency>
132141
<dependency>
133142
<groupId>me.madhead.aws-junit5</groupId>
134143
<artifactId>sqs-v2</artifactId>
135144
<version>{revnumber}</version>
145+
<scope>test</scope>
136146
</dependency>
137147
<dependency>
138148
<groupId>me.madhead.aws-junit5</groupId>
139149
<artifactId>ses-v1</artifactId>
140150
<version>{revnumber}</version>
151+
<scope>test</scope>
141152
</dependency>
142153
<dependency>
143154
<groupId>me.madhead.aws-junit5</groupId>
144155
<artifactId>ses-v2</artifactId>
145156
<version>{revnumber}</version>
157+
<scope>test</scope>
146158
</dependency>
147159
<dependency>
148160
<groupId>me.madhead.aws-junit5</groupId>
149161
<artifactId>lambda-v1</artifactId>
150162
<version>{revnumber}</version>
163+
<scope>test</scope>
151164
</dependency>
152165
<dependency>
153166
<groupId>me.madhead.aws-junit5</groupId>
154167
<artifactId>lambda-v2</artifactId>
155168
<version>{revnumber}</version>
169+
<scope>test</scope>
156170
</dependency>
157171
</dependencies>
158172
----

dynamo/v1/src/test/java/me/madhead/aws_junit5/dynamo/v1/AmazonDynamoDBAsyncInjectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void test() throws Exception {
2727
);
2828
}
2929

30-
public static class Endpoint implements AWSEndpoint {
30+
private static class Endpoint implements AWSEndpoint {
3131
@Override
3232
public String url() {
3333
return System.getProperty("dynamodb.url");

dynamo/v1/src/test/java/me/madhead/aws_junit5/dynamo/v1/AmazonDynamoDBInjectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void test() {
3030
//end::usage[]
3131

3232
//tag::endpoint[]
33-
public static class Endpoint implements AWSEndpoint {
33+
private static class Endpoint implements AWSEndpoint {
3434
@Override
3535
public String url() {
3636
return System.getenv("DYNAMODB_URL");

dynamo/v1/src/test/java/me/madhead/aws_junit5/dynamo/v1/AmazonDynamoDBStreamsAsyncInjectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void test() throws Exception {
3636
);
3737
}
3838

39-
public static class Endpoint implements AWSEndpoint {
39+
private static class Endpoint implements AWSEndpoint {
4040
@Override
4141
public String url() {
4242
return System.getProperty("dynamodbstreams.url");

dynamo/v1/src/test/java/me/madhead/aws_junit5/dynamo/v1/AmazonDynamoDBStreamsInjectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void test() {
3535
);
3636
}
3737

38-
public static class Endpoint implements AWSEndpoint {
38+
private static class Endpoint implements AWSEndpoint {
3939
@Override
4040
public String url() {
4141
return System.getenv("DYNAMODB_STREAMS_URL");

dynamo/v2/src/test/java/me/madhead/aws_junit5/dynamo/v2/DynamoDbAsyncClientInjectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void test() throws Exception {
3333
);
3434
}
3535

36-
public static class Endpoint implements AWSEndpoint {
36+
private static class Endpoint implements AWSEndpoint {
3737
@Override
3838
public String url() {
3939
return System.getProperty("dynamodb.url");

0 commit comments

Comments
 (0)