Skip to content

Commit 004a330

Browse files
committed
Move schema pattern for not starting with "arduino" to the general definitions file
Since this was previously only used for library.properties, it was in that schema file, but now it will be shared with the package index schema, and so should be in the appropriate file for that usage.
1 parent 8ee91f5 commit 004a330

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Diff for: etc/schemas/arduino-library-properties-definitions-schema.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
"definitions": {
77
"general": {
88
"patternObjects": {
9-
"notStartsWithArduino": {
10-
"not": {
11-
"pattern": "^[aA][rR][dD][uU][iI][nN][oO].*$"
12-
}
13-
},
149
"notContainsArduino": {
1510
"not": {
1611
"pattern": "^.+[aA][rR][dD][uU][iI][nN][oO].*$"
@@ -69,7 +64,7 @@
6964
},
7065
{
7166
"$comment": "Only official Arduino libraries are allowed to have names starting with \"Arduino\"",
72-
"$ref": "#/definitions/general/patternObjects/notStartsWithArduino"
67+
"$ref": "general-definitions-schema.json#/definitions/patternObjects/notStartsWithArduino"
7368
}
7469
]
7570
}
@@ -228,7 +223,7 @@
228223
},
229224
{
230225
"$comment": "Only official Arduino libraries are allowed to have maintainer field starting with \"Arduino\"",
231-
"$ref": "#/definitions/general/patternObjects/notStartsWithArduino"
226+
"$ref": "general-definitions-schema.json#/definitions/patternObjects/notStartsWithArduino"
232227
}
233228
]
234229
}

Diff for: etc/schemas/general-definitions-schema.json

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
"containsPropertyReference": {
1818
"$comment": "https://arduino.github.io/arduino-cli/dev/platform-specification/#configuration-files-format",
1919
"pattern": "{.+}"
20+
},
21+
"notStartsWithArduino": {
22+
"not": {
23+
"pattern": "^[aA][rR][dD][uU][iI][nN][oO].*$"
24+
}
2025
}
2126
}
2227
}

Diff for: internal/rule/schema/schemadata/bindata.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -1425,11 +1425,6 @@ var _arduinoLibraryPropertiesDefinitionsSchemaJson = []byte(`{
14251425
"definitions": {
14261426
"general": {
14271427
"patternObjects": {
1428-
"notStartsWithArduino": {
1429-
"not": {
1430-
"pattern": "^[aA][rR][dD][uU][iI][nN][oO].*$"
1431-
}
1432-
},
14331428
"notContainsArduino": {
14341429
"not": {
14351430
"pattern": "^.+[aA][rR][dD][uU][iI][nN][oO].*$"
@@ -1488,7 +1483,7 @@ var _arduinoLibraryPropertiesDefinitionsSchemaJson = []byte(`{
14881483
},
14891484
{
14901485
"$comment": "Only official Arduino libraries are allowed to have names starting with \"Arduino\"",
1491-
"$ref": "#/definitions/general/patternObjects/notStartsWithArduino"
1486+
"$ref": "general-definitions-schema.json#/definitions/patternObjects/notStartsWithArduino"
14921487
}
14931488
]
14941489
}
@@ -1647,7 +1642,7 @@ var _arduinoLibraryPropertiesDefinitionsSchemaJson = []byte(`{
16471642
},
16481643
{
16491644
"$comment": "Only official Arduino libraries are allowed to have maintainer field starting with \"Arduino\"",
1650-
"$ref": "#/definitions/general/patternObjects/notStartsWithArduino"
1645+
"$ref": "general-definitions-schema.json#/definitions/patternObjects/notStartsWithArduino"
16511646
}
16521647
]
16531648
}
@@ -4370,6 +4365,11 @@ var _generalDefinitionsSchemaJson = []byte(`{
43704365
"containsPropertyReference": {
43714366
"$comment": "https://arduino.github.io/arduino-cli/dev/platform-specification/#configuration-files-format",
43724367
"pattern": "{.+}"
4368+
},
4369+
"notStartsWithArduino": {
4370+
"not": {
4371+
"pattern": "^[aA][rR][dD][uU][iI][nN][oO].*$"
4372+
}
43734373
}
43744374
}
43754375
}

0 commit comments

Comments
 (0)