Skip to content

Commit 297d2e2

Browse files
committed
chore: update gocritic json schema
1 parent 840e3c4 commit 297d2e2

File tree

2 files changed

+152
-3
lines changed

2 files changed

+152
-3
lines changed

.golangci.next.reference.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ linters-settings:
629629
# - 'import': ruleguard rule imports a package that cannot be found.
630630
# - 'dsl': gorule file does not comply with the ruleguard DSL.
631631
# Default: ""
632-
failOn: dsl
632+
failOn: dsl,import
633633
# Comma-separated list of file paths containing ruleguard rules.
634634
# If a path is relative, it is relative to the directory where the golangci-lint command is executed.
635635
# The special '${configDir}' variable is substituted with the absolute directory containing the golangci config file.

jsonschema/golangci.next.jsonschema.json

Lines changed: 151 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,8 +1143,157 @@
11431143
"settings": {
11441144
"description": "Settings passed to gocritic. Properties must be valid and enabled check names.",
11451145
"type": "object",
1146-
"propertyNames": {
1147-
"$ref": "#/definitions/gocritic-checks"
1146+
"additionalProperties": false,
1147+
"properties": {
1148+
"captLocal": {
1149+
"type": "object",
1150+
"additionalProperties": false,
1151+
"properties": {
1152+
"paramsOnly" : {
1153+
"type": "boolean",
1154+
"default": true
1155+
}
1156+
}
1157+
},
1158+
"commentedOutCode": {
1159+
"type": "object",
1160+
"additionalProperties": false,
1161+
"properties": {
1162+
"minLength" : {
1163+
"type": "number",
1164+
"default": 15
1165+
}
1166+
}
1167+
},
1168+
"elseif": {
1169+
"type": "object",
1170+
"additionalProperties": false,
1171+
"properties": {
1172+
"skipBalanced" : {
1173+
"type": "boolean",
1174+
"default": true
1175+
}
1176+
}
1177+
},
1178+
"hugeParam": {
1179+
"type": "object",
1180+
"additionalProperties": false,
1181+
"properties": {
1182+
"sizeThreshold" : {
1183+
"type": "number",
1184+
"default": 80
1185+
}
1186+
}
1187+
},
1188+
"ifElseChain": {
1189+
"type": "object",
1190+
"additionalProperties": false,
1191+
"properties": {
1192+
"minThreshold" : {
1193+
"type": "number",
1194+
"default": 2
1195+
}
1196+
}
1197+
},
1198+
"nestingReduce": {
1199+
"type": "object",
1200+
"additionalProperties": false,
1201+
"properties": {
1202+
"bodyWidth" : {
1203+
"type": "number",
1204+
"default": 5
1205+
}
1206+
}
1207+
},
1208+
"rangeExprCopy": {
1209+
"type": "object",
1210+
"additionalProperties": false,
1211+
"properties": {
1212+
"sizeThreshold" : {
1213+
"type": "number",
1214+
"default": 512
1215+
},
1216+
"skipTestFuncs" : {
1217+
"type": "boolean",
1218+
"default": true
1219+
}
1220+
}
1221+
},
1222+
"rangeValCopy": {
1223+
"type": "object",
1224+
"additionalProperties": false,
1225+
"properties": {
1226+
"sizeThreshold" : {
1227+
"type": "number",
1228+
"default": 128
1229+
},
1230+
"skipTestFuncs" : {
1231+
"type": "boolean",
1232+
"default": true
1233+
}
1234+
}
1235+
},
1236+
"ruleguard": {
1237+
"type": "object",
1238+
"additionalProperties": false,
1239+
"properties": {
1240+
"debug" : {
1241+
"type": "string"
1242+
},
1243+
"enable" : {
1244+
"type": "string"
1245+
},
1246+
"disable" : {
1247+
"type": "string"
1248+
},
1249+
"failOn" : {
1250+
"type": "string"
1251+
},
1252+
"rules" : {
1253+
"type": "string"
1254+
}
1255+
}
1256+
},
1257+
"tooManyResultsChecker": {
1258+
"type": "object",
1259+
"additionalProperties": false,
1260+
"properties": {
1261+
"maxResults" : {
1262+
"type": "number",
1263+
"default": 5
1264+
}
1265+
}
1266+
},
1267+
"truncateCmp": {
1268+
"type": "object",
1269+
"additionalProperties": false,
1270+
"properties": {
1271+
"skipArchDependent" : {
1272+
"type": "boolean",
1273+
"default": true
1274+
}
1275+
}
1276+
},
1277+
"underef": {
1278+
"type": "object",
1279+
"additionalProperties": false,
1280+
"properties": {
1281+
"skipRecvDeref" : {
1282+
"type": "boolean",
1283+
"default": true
1284+
}
1285+
}
1286+
},
1287+
"unnamedResult": {
1288+
"type": "object",
1289+
"additionalProperties": false,
1290+
"properties": {
1291+
"checkExported" : {
1292+
"type": "boolean",
1293+
"default": false
1294+
}
1295+
}
1296+
}
11481297
}
11491298
},
11501299
"disable-all": {

0 commit comments

Comments
 (0)