Skip to content

Commit 1c64ac2

Browse files
committed
LimeDocRulesValidator: make 'isWarningOnly' flag optional JSON param
Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
1 parent dd64436 commit 1c64ac2

2 files changed

Lines changed: 1 addition & 26 deletions

File tree

gluecodium/src/main/java/com/here/gluecodium/validator/LimeDocValidationRule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ data class LimeDocValidationRule(
2626
val name: String,
2727
val limeElements: List<String>,
2828
val regex: String,
29-
val isWarningOnly: Boolean,
29+
val isWarningOnly: Boolean = false,
3030
val resolvePlaceholders: Boolean = true,
3131
val platforms: List<String> = listOf(),
3232
)

gluecodium/src/test/java/com/here/gluecodium/validator/LimeDocRulesValidatorTest.kt

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ class LimeDocRulesValidatorTest {
111111
name = "MY_RULE",
112112
limeElements = listOf("class", "struct"),
113113
regex = "(a|b",
114-
isWarningOnly = false,
115114
),
116115
)
117116

@@ -134,7 +133,6 @@ class LimeDocRulesValidatorTest {
134133
name = "SPECIAL_RULE",
135134
limeElements = emptyList(),
136135
regex = "It is a special type",
137-
isWarningOnly = false,
138136
),
139137
)
140138

@@ -157,7 +155,6 @@ class LimeDocRulesValidatorTest {
157155
name = "SPECIAL_RULE",
158156
limeElements = listOf("class", "mixin"),
159157
regex = "It is a special type",
160-
isWarningOnly = false,
161158
),
162159
)
163160

@@ -209,7 +206,6 @@ class LimeDocRulesValidatorTest {
209206
name = "SPECIAL_RULE",
210207
limeElements = listOf("class"),
211208
regex = "It is a special type",
212-
isWarningOnly = false,
213209
),
214210
)
215211

@@ -261,7 +257,6 @@ class LimeDocRulesValidatorTest {
261257
name = "SPECIAL_RULE",
262258
limeElements = listOf("class"),
263259
regex = "It is a special type",
264-
isWarningOnly = false,
265260
),
266261
)
267262

@@ -313,7 +308,6 @@ class LimeDocRulesValidatorTest {
313308
name = "SPECIAL_RULE",
314309
limeElements = listOf("class"),
315310
regex = "It is a (STRONG|WEAK) type",
316-
isWarningOnly = false,
317311
),
318312
)
319313

@@ -351,7 +345,6 @@ class LimeDocRulesValidatorTest {
351345
name = "Plain old data structure",
352346
limeElements = listOf("struct"),
353347
regex = "@POD_STRUCT",
354-
isWarningOnly = false,
355348
),
356349
)
357350

@@ -388,7 +381,6 @@ class LimeDocRulesValidatorTest {
388381
name = "Plain old data structure",
389382
limeElements = listOf("struct"),
390383
regex = "@POD_STRUCT",
391-
isWarningOnly = false,
392384
),
393385
)
394386

@@ -426,7 +418,6 @@ class LimeDocRulesValidatorTest {
426418
name = "Public interface",
427419
limeElements = listOf("interface"),
428420
regex = "@PUBLIC_INTERFACE",
429-
isWarningOnly = false,
430421
),
431422
)
432423

@@ -463,7 +454,6 @@ class LimeDocRulesValidatorTest {
463454
name = "Public interface",
464455
limeElements = listOf("interface"),
465456
regex = "@PUBLIC_INTERFACE",
466-
isWarningOnly = false,
467457
),
468458
)
469459

@@ -501,7 +491,6 @@ class LimeDocRulesValidatorTest {
501491
name = "Error code",
502492
limeElements = listOf("enum"),
503493
regex = "@ERROR_CODE",
504-
isWarningOnly = false,
505494
),
506495
)
507496

@@ -538,7 +527,6 @@ class LimeDocRulesValidatorTest {
538527
name = "Error code",
539528
limeElements = listOf("enum"),
540529
regex = "@ERROR_CODE",
541-
isWarningOnly = false,
542530
),
543531
)
544532

@@ -580,7 +568,6 @@ class LimeDocRulesValidatorTest {
580568
name = "Standard calling convention",
581569
limeElements = listOf("function"),
582570
regex = "@CallingConvention\\('Standard'\\)",
583-
isWarningOnly = false,
584571
),
585572
)
586573

@@ -618,7 +605,6 @@ class LimeDocRulesValidatorTest {
618605
name = "Standard calling convention",
619606
limeElements = listOf("function"),
620607
regex = "@CallingConvention\\('Standard'\\)",
621-
isWarningOnly = false,
622608
),
623609
)
624610

@@ -656,7 +642,6 @@ class LimeDocRulesValidatorTest {
656642
name = "Available only online",
657643
limeElements = listOf("lambda"),
658644
regex = "Available only in online mode",
659-
isWarningOnly = false,
660645
),
661646
)
662647

@@ -690,7 +675,6 @@ class LimeDocRulesValidatorTest {
690675
name = "Available only online",
691676
limeElements = listOf("lambda"),
692677
regex = "Available only in online mode",
693-
isWarningOnly = false,
694678
),
695679
)
696680

@@ -776,13 +760,11 @@ class LimeDocRulesValidatorTest {
776760
name = "Available online/offline",
777761
limeElements = listOf("class", "struct", "lambda"),
778762
regex = "Available only in (offline|online) mode",
779-
isWarningOnly = false,
780763
),
781764
LimeDocValidationRule(
782765
name = "Standard calling convention",
783766
limeElements = listOf("function"),
784767
regex = "@CallingConvention\\('Standard'\\)",
785-
isWarningOnly = false,
786768
),
787769
)
788770

@@ -862,7 +844,6 @@ class LimeDocRulesValidatorTest {
862844
name = "PROPERTY_RULE",
863845
limeElements = listOf("property"),
864846
regex = "It is a (special|normal) property",
865-
isWarningOnly = false,
866847
),
867848
)
868849

@@ -908,7 +889,6 @@ class LimeDocRulesValidatorTest {
908889
name = "PROPERTY_RULE",
909890
limeElements = listOf("property"),
910891
regex = "It is a (special|normal) property",
911-
isWarningOnly = false,
912892
),
913893
)
914894

@@ -947,7 +927,6 @@ class LimeDocRulesValidatorTest {
947927
name = "SPECIAL_RULE",
948928
limeElements = listOf("class"),
949929
regex = "This type is available only online",
950-
isWarningOnly = false,
951930
),
952931
)
953932

@@ -986,7 +965,6 @@ class LimeDocRulesValidatorTest {
986965
name = "SPECIAL_RULE",
987966
limeElements = listOf("class"),
988967
regex = "@Placeholder AvailableOnline",
989-
isWarningOnly = false,
990968
resolvePlaceholders = false,
991969
),
992970
)
@@ -1022,7 +1000,6 @@ class LimeDocRulesValidatorTest {
10221000
name = "SPECIAL_RULE",
10231001
limeElements = listOf("class"),
10241002
regex = "@Placeholder AvailableOnline",
1025-
isWarningOnly = false,
10261003
resolvePlaceholders = false,
10271004
),
10281005
)
@@ -1064,7 +1041,6 @@ class LimeDocRulesValidatorTest {
10641041
name = "SPECIAL_RULE",
10651042
limeElements = listOf("class"),
10661043
regex = "It is a (SPECIAL|NORMAL) type",
1067-
isWarningOnly = false,
10681044
platforms = listOf("Java", "Dart"),
10691045
),
10701046
)
@@ -1105,7 +1081,6 @@ class LimeDocRulesValidatorTest {
11051081
name = "SPECIAL_RULE",
11061082
limeElements = listOf("class"),
11071083
regex = "It is a NORMAL type",
1108-
isWarningOnly = false,
11091084
platforms = listOf("Swift"),
11101085
),
11111086
)

0 commit comments

Comments
 (0)