From 7c42f3a1d83cf6dbbd063e9581457b737c8b931a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 3 Mar 2025 17:59:26 +0100 Subject: [PATCH 1/3] Fix schema not accepting valid time.Duration format --- .golangci.next.reference.yml | 2 +- .golangci.reference.yml | 2 +- jsonschema/golangci.jsonschema.json | 4 ++-- jsonschema/golangci.next.jsonschema.json | 4 ++-- jsonschema/golangci.v1.57.jsonschema.json | 4 ++-- jsonschema/golangci.v1.58.jsonschema.json | 4 ++-- jsonschema/golangci.v1.59.jsonschema.json | 4 ++-- jsonschema/golangci.v1.60.jsonschema.json | 4 ++-- jsonschema/golangci.v1.61.jsonschema.json | 4 ++-- jsonschema/golangci.v1.62.jsonschema.json | 4 ++-- jsonschema/golangci.v1.63.jsonschema.json | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.golangci.next.reference.yml b/.golangci.next.reference.yml index 54159cd3b008..fb0895eb3700 100644 --- a/.golangci.next.reference.yml +++ b/.golangci.next.reference.yml @@ -4159,7 +4159,7 @@ output: # Options for analysis running. run: - # Timeout for analysis, e.g. 30s, 5m. + # Timeout for analysis, e.g. 30s, 5m, 5m30s. # If the value is lower or equal to 0, the timeout is disabled. # Default: 1m timeout: 5m diff --git a/.golangci.reference.yml b/.golangci.reference.yml index 54159cd3b008..fb0895eb3700 100644 --- a/.golangci.reference.yml +++ b/.golangci.reference.yml @@ -4159,7 +4159,7 @@ output: # Options for analysis running. run: - # Timeout for analysis, e.g. 30s, 5m. + # Timeout for analysis, e.g. 30s, 5m, 5m30s. # If the value is lower or equal to 0, the timeout is disabled. # Default: 1m timeout: 5m diff --git a/jsonschema/golangci.jsonschema.json b/jsonschema/golangci.jsonschema.json index b52a2f532dc8..98732b9c50cc 100644 --- a/jsonschema/golangci.jsonschema.json +++ b/jsonschema/golangci.jsonschema.json @@ -472,9 +472,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json index b52a2f532dc8..98732b9c50cc 100644 --- a/jsonschema/golangci.next.jsonschema.json +++ b/jsonschema/golangci.next.jsonschema.json @@ -472,9 +472,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.v1.57.jsonschema.json b/jsonschema/golangci.v1.57.jsonschema.json index 8ef0588837f9..6266621239ea 100644 --- a/jsonschema/golangci.v1.57.jsonschema.json +++ b/jsonschema/golangci.v1.57.jsonschema.json @@ -351,9 +351,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.v1.58.jsonschema.json b/jsonschema/golangci.v1.58.jsonschema.json index d7f790cdcca6..1794bc2a8781 100644 --- a/jsonschema/golangci.v1.58.jsonschema.json +++ b/jsonschema/golangci.v1.58.jsonschema.json @@ -353,9 +353,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.v1.59.jsonschema.json b/jsonschema/golangci.v1.59.jsonschema.json index d1ef23834332..c696cb6e5e9b 100644 --- a/jsonschema/golangci.v1.59.jsonschema.json +++ b/jsonschema/golangci.v1.59.jsonschema.json @@ -435,9 +435,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.v1.60.jsonschema.json b/jsonschema/golangci.v1.60.jsonschema.json index 087ad65b89cb..c071f1d77cac 100644 --- a/jsonschema/golangci.v1.60.jsonschema.json +++ b/jsonschema/golangci.v1.60.jsonschema.json @@ -441,9 +441,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.v1.61.jsonschema.json b/jsonschema/golangci.v1.61.jsonschema.json index 18bd56fbea14..8ad4a2ef1630 100644 --- a/jsonschema/golangci.v1.61.jsonschema.json +++ b/jsonschema/golangci.v1.61.jsonschema.json @@ -440,9 +440,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.v1.62.jsonschema.json b/jsonschema/golangci.v1.62.jsonschema.json index 2e93a2fc5403..2b69a66d84b9 100644 --- a/jsonschema/golangci.v1.62.jsonschema.json +++ b/jsonschema/golangci.v1.62.jsonschema.json @@ -442,9 +442,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", diff --git a/jsonschema/golangci.v1.63.jsonschema.json b/jsonschema/golangci.v1.63.jsonschema.json index a5992b16c740..8a7e2b4c3622 100644 --- a/jsonschema/golangci.v1.63.jsonschema.json +++ b/jsonschema/golangci.v1.63.jsonschema.json @@ -463,9 +463,9 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^\\d*[sm]$", + "pattern": "^(\\d*m)?\\d*[sm]$", "default": "1m", - "examples": ["30s", "5m"] + "examples": ["30s", "5m", "5m30s"] }, "issues-exit-code": { "description": "Exit code when at least one issue was found.", From 31f51275453ec103be2af5ca3d68918d6d9bc46e Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 3 Mar 2025 18:39:22 +0100 Subject: [PATCH 2/3] review --- jsonschema/golangci.jsonschema.json | 2 +- jsonschema/golangci.next.jsonschema.json | 2 +- jsonschema/golangci.v1.57.jsonschema.json | 2 +- jsonschema/golangci.v1.58.jsonschema.json | 2 +- jsonschema/golangci.v1.59.jsonschema.json | 2 +- jsonschema/golangci.v1.60.jsonschema.json | 2 +- jsonschema/golangci.v1.61.jsonschema.json | 2 +- jsonschema/golangci.v1.62.jsonschema.json | 2 +- jsonschema/golangci.v1.63.jsonschema.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jsonschema/golangci.jsonschema.json b/jsonschema/golangci.jsonschema.json index 98732b9c50cc..1a14b6195670 100644 --- a/jsonschema/golangci.jsonschema.json +++ b/jsonschema/golangci.jsonschema.json @@ -472,7 +472,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json index 98732b9c50cc..1a14b6195670 100644 --- a/jsonschema/golangci.next.jsonschema.json +++ b/jsonschema/golangci.next.jsonschema.json @@ -472,7 +472,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.57.jsonschema.json b/jsonschema/golangci.v1.57.jsonschema.json index 6266621239ea..7ea125959465 100644 --- a/jsonschema/golangci.v1.57.jsonschema.json +++ b/jsonschema/golangci.v1.57.jsonschema.json @@ -351,7 +351,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.58.jsonschema.json b/jsonschema/golangci.v1.58.jsonschema.json index 1794bc2a8781..fbcad95c509a 100644 --- a/jsonschema/golangci.v1.58.jsonschema.json +++ b/jsonschema/golangci.v1.58.jsonschema.json @@ -353,7 +353,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.59.jsonschema.json b/jsonschema/golangci.v1.59.jsonschema.json index c696cb6e5e9b..63a795ed6e09 100644 --- a/jsonschema/golangci.v1.59.jsonschema.json +++ b/jsonschema/golangci.v1.59.jsonschema.json @@ -435,7 +435,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.60.jsonschema.json b/jsonschema/golangci.v1.60.jsonschema.json index c071f1d77cac..5a9d23eff6a7 100644 --- a/jsonschema/golangci.v1.60.jsonschema.json +++ b/jsonschema/golangci.v1.60.jsonschema.json @@ -441,7 +441,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.61.jsonschema.json b/jsonschema/golangci.v1.61.jsonschema.json index 8ad4a2ef1630..f1267dccc0fa 100644 --- a/jsonschema/golangci.v1.61.jsonschema.json +++ b/jsonschema/golangci.v1.61.jsonschema.json @@ -440,7 +440,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.62.jsonschema.json b/jsonschema/golangci.v1.62.jsonschema.json index 2b69a66d84b9..518670440e02 100644 --- a/jsonschema/golangci.v1.62.jsonschema.json +++ b/jsonschema/golangci.v1.62.jsonschema.json @@ -442,7 +442,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.63.jsonschema.json b/jsonschema/golangci.v1.63.jsonschema.json index 8a7e2b4c3622..2f56b74591e4 100644 --- a/jsonschema/golangci.v1.63.jsonschema.json +++ b/jsonschema/golangci.v1.63.jsonschema.json @@ -463,7 +463,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d*m)?\\d*[sm]$", + "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, From 4abd55db9d230e76b726b2920d09125abae7f740 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 3 Mar 2025 19:07:03 +0100 Subject: [PATCH 3/3] review --- jsonschema/golangci.jsonschema.json | 2 +- jsonschema/golangci.next.jsonschema.json | 2 +- jsonschema/golangci.v1.57.jsonschema.json | 2 +- jsonschema/golangci.v1.58.jsonschema.json | 2 +- jsonschema/golangci.v1.59.jsonschema.json | 2 +- jsonschema/golangci.v1.60.jsonschema.json | 2 +- jsonschema/golangci.v1.61.jsonschema.json | 2 +- jsonschema/golangci.v1.62.jsonschema.json | 2 +- jsonschema/golangci.v1.63.jsonschema.json | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jsonschema/golangci.jsonschema.json b/jsonschema/golangci.jsonschema.json index 1a14b6195670..f80ccf06235a 100644 --- a/jsonschema/golangci.jsonschema.json +++ b/jsonschema/golangci.jsonschema.json @@ -472,7 +472,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.next.jsonschema.json b/jsonschema/golangci.next.jsonschema.json index 1a14b6195670..f80ccf06235a 100644 --- a/jsonschema/golangci.next.jsonschema.json +++ b/jsonschema/golangci.next.jsonschema.json @@ -472,7 +472,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.57.jsonschema.json b/jsonschema/golangci.v1.57.jsonschema.json index 7ea125959465..a97c0d42919a 100644 --- a/jsonschema/golangci.v1.57.jsonschema.json +++ b/jsonschema/golangci.v1.57.jsonschema.json @@ -351,7 +351,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.58.jsonschema.json b/jsonschema/golangci.v1.58.jsonschema.json index fbcad95c509a..d0bdc8d7b95e 100644 --- a/jsonschema/golangci.v1.58.jsonschema.json +++ b/jsonschema/golangci.v1.58.jsonschema.json @@ -353,7 +353,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.59.jsonschema.json b/jsonschema/golangci.v1.59.jsonschema.json index 63a795ed6e09..cc3e63655bc1 100644 --- a/jsonschema/golangci.v1.59.jsonschema.json +++ b/jsonschema/golangci.v1.59.jsonschema.json @@ -435,7 +435,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.60.jsonschema.json b/jsonschema/golangci.v1.60.jsonschema.json index 5a9d23eff6a7..b8920ae06f94 100644 --- a/jsonschema/golangci.v1.60.jsonschema.json +++ b/jsonschema/golangci.v1.60.jsonschema.json @@ -441,7 +441,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.61.jsonschema.json b/jsonschema/golangci.v1.61.jsonschema.json index f1267dccc0fa..a574b0195bca 100644 --- a/jsonschema/golangci.v1.61.jsonschema.json +++ b/jsonschema/golangci.v1.61.jsonschema.json @@ -440,7 +440,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.62.jsonschema.json b/jsonschema/golangci.v1.62.jsonschema.json index 518670440e02..3ca3593b2600 100644 --- a/jsonschema/golangci.v1.62.jsonschema.json +++ b/jsonschema/golangci.v1.62.jsonschema.json @@ -442,7 +442,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] }, diff --git a/jsonschema/golangci.v1.63.jsonschema.json b/jsonschema/golangci.v1.63.jsonschema.json index 2f56b74591e4..c54dd6904d13 100644 --- a/jsonschema/golangci.v1.63.jsonschema.json +++ b/jsonschema/golangci.v1.63.jsonschema.json @@ -463,7 +463,7 @@ "timeout": { "description": "Timeout for the analysis.", "type": "string", - "pattern": "^(\\d+m\\d+s|\\d+m|\\d+s|\\d)$", + "pattern": "^((\\d+h)?(\\d+m)?(\\d+(?:\\.\\d)?s)?|0)$", "default": "1m", "examples": ["30s", "5m", "5m30s"] },