Skip to content

Commit 57a62a1

Browse files
belagertemben-Draegermidttuna
authored
Add fix for the sequence id ordering problem (#233)
Add the fix for the issue [218](#218) from the [commit ](belagertem@729356b) from the main branch. Fix other queries in MessageStorage that require ordering. # Checklist The following aspects have been respected by the author of this pull request, confirmed by both pull request assignee **and** reviewer: * Adherence to coding conventions * [x] Pull Request Assignee * [x] Reviewer * Adherence to javadoc conventions * [x] Pull Request Assignee * [x] Reviewer * Changelog update (necessity checked and entry added or not added respectively) * [x] Pull Request Assignee * [x] Reviewer * README update (necessity checked and entry added or not added respectively) * [x] Pull Request Assignee * [x] Reviewer * config update (necessity checked and entry added or not added respectively) * [x] Pull Request Assignee * [x] Reviewer * SDCcc executable ran against a test device (if necessary) * [x] Pull Request Assignee * [x] Reviewer --------- Signed-off-by: Malte Grebe-Lüth <[email protected]> Co-authored-by: Björn <[email protected]> Co-authored-by: midttuna <[email protected]>
1 parent d786e0a commit 57a62a1

File tree

10 files changed

+468
-54
lines changed

10 files changed

+468
-54
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
if: startsWith(github.ref, 'refs/tags/')
9393
working-directory: sdccc/target/
9494
run: |
95-
zip -qq -r test-results.zip failsafe-reports surefire-reports checkstyle-result.xml spotbugsXml.xml
95+
zip -qq -r test-results.zip failsafe-reports surefire-reports checkstyle-result.xml spotbugsXml.xml detekt.html
9696
9797
- name: Attach artifacts to snapshot
9898
uses: softprops/action-gh-release@v1

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88

99
### Fixed
10-
10+
11+
- SequenceIds are now ordered by the timestamp of the first message that used them
12+
13+
## [9.0.1] - 2024-08-19
14+
15+
### Fixed
16+
1117
- biceps:C-11, biceps:C-12, biceps:C-13, biceps:C-14 and biceps:C-15 no longer fails incorrectly if a DescriptionModificationReport with the same MdibVersion has been sent for the respective EpisodicReport.
1218

1319
## [9.0.0] - 2024-02-23

configuration/test_configuration.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ R0029_0=true
1717
R0033=true
1818
R0034_0=true
1919
R0038_0=true
20-
R0055_0=false
20+
R0055_0=true
2121
R0062=true
2222
R0064=true
2323
R0066=true

dev_config/detekt.yml

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
config:
2+
warningsAsErrors: true
3+
4+
comments:
5+
DeprecatedBlockTag:
6+
active: true
7+
EndOfSentenceFormat:
8+
active: true
9+
KDocReferencesNonPublicProperty:
10+
active: true
11+
OutdatedDocumentation:
12+
active: true
13+
UndocumentedPublicClass:
14+
active: true
15+
excludes: []
16+
UndocumentedPublicFunction:
17+
active: true
18+
UndocumentedPublicProperty:
19+
active: true
20+
excludes: []
21+
22+
complexity:
23+
ComplexCondition:
24+
threshold: 6
25+
ComplexInterface:
26+
active: true
27+
CyclomaticComplexMethod:
28+
threshold: 20
29+
LongMethod:
30+
active: false
31+
MethodOverloading:
32+
active: true
33+
NamedArguments:
34+
active: true
35+
NestedBlockDepth:
36+
active: false
37+
ReplaceSafeCallChainWithRun:
38+
active: true
39+
StringLiteralDuplication:
40+
active: true
41+
excludes: []
42+
43+
exceptions:
44+
NotImplementedDeclaration:
45+
active: true
46+
ObjectExtendsThrowable:
47+
active: true
48+
ThrowingExceptionInMain:
49+
active: true
50+
TooGenericExceptionCaught:
51+
excludes: []
52+
53+
naming:
54+
FunctionMinLength:
55+
active: true
56+
minimumFunctionNameLength: 3
57+
LambdaParameterNaming:
58+
active: true
59+
60+
performance:
61+
CouldBeSequence:
62+
active: true
63+
ForEachOnRange:
64+
excludes: []
65+
SpreadOperator:
66+
excludes: []
67+
UnnecessaryPartOfBinaryExpression:
68+
active: true
69+
70+
potential-bugs:
71+
CastNullableToNonNullableType:
72+
active: true
73+
CastToNullableType:
74+
active: true
75+
DontDowncastCollectionTypes:
76+
active: true
77+
ElseCaseInsteadOfExhaustiveWhen:
78+
active: true
79+
ExitOutsideMain:
80+
active: true
81+
ImplicitUnitReturnType:
82+
active: true
83+
MissingPackageDeclaration:
84+
active: true
85+
NullCheckOnMutableProperty:
86+
active: true
87+
NullableToStringCall:
88+
active: true
89+
PropertyUsedBeforeDeclaration:
90+
active: true
91+
UnconditionalJumpStatementInLoop:
92+
active: true
93+
UnnecessaryNotNullCheck:
94+
active: true
95+
UnsafeCallOnNullableType:
96+
excludes: []
97+
98+
style:
99+
BracesOnIfStatements:
100+
active: true
101+
BracesOnWhenStatements:
102+
active: true
103+
CascadingCallWrapping:
104+
active: true
105+
ClassOrdering:
106+
active: true
107+
CollapsibleIfStatements:
108+
active: true
109+
DataClassContainsFunctions:
110+
active: true
111+
DataClassShouldBeImmutable:
112+
active: true
113+
DoubleNegativeLambda:
114+
active: true
115+
EqualsOnSignatureLine:
116+
active: true
117+
ExplicitCollectionElementAccessMethod:
118+
active: true
119+
ExpressionBodySyntax:
120+
active: true
121+
ForbiddenAnnotation:
122+
active: true
123+
ForbiddenComment:
124+
active: true
125+
comments:
126+
- reason: 'Forbidden FIXME todo marker in comment, please fix the problem.'
127+
value: 'FIXME:'
128+
- reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.'
129+
value: 'STOPSHIP:'
130+
ForbiddenMethodCall:
131+
active: true
132+
methods:
133+
- reason: 'print does not allow you to configure the output stream. Use a logger instead.'
134+
value: 'kotlin.io.print'
135+
- reason: 'println does not allow you to configure the output stream. Use a logger instead.'
136+
value: 'kotlin.io.println'
137+
MagicNumber:
138+
excludes: []
139+
ignoreLocalVariableDeclaration: true
140+
MandatoryBracesLoops:
141+
active: true
142+
MaxChainedCallsOnSameLine:
143+
active: true
144+
MultilineRawStringIndentation:
145+
active: true
146+
NoTabs:
147+
active: true
148+
NullableBooleanCheck:
149+
active: true
150+
OptionalUnit:
151+
active: true
152+
RedundantVisibilityModifierRule:
153+
active: true
154+
ReturnCount:
155+
active: true
156+
max: 3
157+
SpacingBetweenPackageAndImports:
158+
active: true
159+
TrailingWhitespace:
160+
active: true
161+
TrimMultilineRawString:
162+
active: true
163+
UnderscoresInNumericLiterals:
164+
active: true
165+
UnnecessaryAnnotationUseSiteTarget:
166+
active: true
167+
UnnecessaryBackticks:
168+
active: true
169+
UnnecessaryBracesAroundTrailingLambda:
170+
active: true
171+
UnnecessaryInnerClass:
172+
active: true
173+
UnnecessaryLet:
174+
active: true
175+
UnnecessaryParentheses:
176+
active: true
177+
allowForUnclearPrecedence: true
178+
UntilInsteadOfRangeTo:
179+
active: true
180+
UnusedImports:
181+
active: true
182+
UseDataClass:
183+
active: true
184+
UseEmptyCounterpart:
185+
active: true
186+
UseIfEmptyOrIfBlank:
187+
active: true
188+
UseLet:
189+
active: true
190+
WildcardImport:
191+
active: true
192+
excludeImports: []

spotbugs/filter.xml renamed to dev_config/filter.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66
<Match>
77
<Bug pattern="EI_EXPOSE_REP2"/>
88
</Match>
9+
<Match>
10+
<Source name="~.*\.kt"/>
11+
</Match>
912
</FindBugsFilter>

pom.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,29 @@
1515
</modules>
1616

1717
<properties>
18-
<revision>9.0.1</revision>
18+
<revision>9.0.2</revision>
1919
<changelist>-SNAPSHOT</changelist>
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2121
<execPluginVersion>3.1.0</execPluginVersion>
2222
<jakartaXmlBindApiVersion>4.0.0</jakartaXmlBindApiVersion>
2323
<comSunXmlBindVersion>4.0.1</comSunXmlBindVersion>
24+
<kotlin.version>1.9.23</kotlin.version>
2425
</properties>
2526

2627
<build>
2728
<plugins>
2829

30+
<plugin>
31+
<groupId>org.jetbrains.kotlin</groupId>
32+
<artifactId>kotlin-maven-plugin</artifactId>
33+
<version>${kotlin.version}</version>
34+
<!-- You can set this option to automatically take information about lifecycles -->
35+
<extensions>true</extensions>
36+
<configuration>
37+
<jvmTarget>17</jvmTarget>
38+
</configuration>
39+
</plugin>
40+
2941
<plugin>
3042
<groupId>org.apache.maven.plugins</groupId>
3143
<artifactId>maven-compiler-plugin</artifactId>

sdccc/pom.xml

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<checkstyleConfigDir>../checkstyle</checkstyleConfigDir>
2222
<bouncyCastleVersion>1.67</bouncyCastleVersion>
2323

24+
<detektVersion>1.23.5</detektVersion>
2425
<!-- name of the directory inside the archive -->
2526
<jreDirectoryName>jdk-17.0.5+8-jre</jreDirectoryName>
2627
<jreBasePath>./jre</jreBasePath>
@@ -253,6 +254,20 @@
253254
<scope>test</scope>
254255
</dependency>
255256

257+
<!-- https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-stdlib -->
258+
<dependency>
259+
<groupId>org.jetbrains.kotlin</groupId>
260+
<artifactId>kotlin-stdlib</artifactId>
261+
<version>${kotlin.version}</version>
262+
</dependency>
263+
<!-- https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-test-junit5 -->
264+
<dependency>
265+
<groupId>org.jetbrains.kotlin</groupId>
266+
<artifactId>kotlin-test-junit5</artifactId>
267+
<version>${kotlin.version}</version>
268+
<scope>test</scope>
269+
</dependency>
270+
256271
</dependencies>
257272

258273
<reporting>
@@ -373,7 +388,7 @@
373388
</executions>
374389
<configuration>
375390
<includeTests>true</includeTests>
376-
<excludeFilterFile>../spotbugs/filter.xml</excludeFilterFile>
391+
<excludeFilterFile>${project.basedir}/../dev_config/filter.xml</excludeFilterFile>
377392
</configuration>
378393
</plugin>
379394

@@ -423,6 +438,58 @@
423438
</execution>
424439
</executions>
425440
</plugin>
441+
<plugin>
442+
<groupId>org.apache.maven.plugins</groupId>
443+
<artifactId>maven-antrun-plugin</artifactId>
444+
<version>1.8</version>
445+
<executions>
446+
<execution>
447+
<!-- This can be run separately with mvn antrun:run@detekt -->
448+
<id>detekt</id>
449+
<phase>verify</phase>
450+
<configuration>
451+
<target name="detekt">
452+
<property name="classpath_needed_for_detekt" refid="maven.test.classpath"/>
453+
<java taskname="detekt" dir="${basedir}"
454+
fork="true"
455+
failonerror="true"
456+
classname="io.gitlab.arturbosch.detekt.cli.Main"
457+
classpathref="maven.plugin.classpath">
458+
<arg value="--input"/>
459+
<arg value="${basedir}/../"/>
460+
<arg value="--excludes"/>
461+
<arg value="**/special/package/internal/**"/>
462+
<arg value="--report"/>
463+
<arg value="html:${project.build.directory}/detekt.html"/>
464+
<arg value="--config"/>
465+
<arg value="${project.basedir}/../dev_config/detekt.yml"/>
466+
<arg value="--debug"/>
467+
<arg value="--build-upon-default-config"/>
468+
<arg value="--classpath"/>
469+
<arg value="${classpath_needed_for_detekt}"/>
470+
<arg value="--jdk-home"/>
471+
<arg value="${java.home}"/>
472+
<arg value="--jvm-target"/>
473+
<arg value="17"/>
474+
</java>
475+
</target>
476+
</configuration>
477+
<goals><goal>run</goal></goals>
478+
</execution>
479+
</executions>
480+
<dependencies>
481+
<dependency>
482+
<groupId>io.gitlab.arturbosch.detekt</groupId>
483+
<artifactId>detekt-cli</artifactId>
484+
<version>${detektVersion}</version>
485+
</dependency>
486+
<dependency>
487+
<groupId>io.gitlab.arturbosch.detekt</groupId>
488+
<artifactId>detekt-formatting</artifactId>
489+
<version>${detektVersion}</version>
490+
</dependency>
491+
</dependencies>
492+
</plugin>
426493
<plugin>
427494
<groupId>org.codehaus.mojo</groupId>
428495
<artifactId>exec-maven-plugin</artifactId>

0 commit comments

Comments
 (0)