feat: verify with the JSONSchema

This commit is contained in:
Fernandez Ludovic 2025-02-13 22:21:05 +01:00
parent 47d1bdb762
commit 646655a0f0
3 changed files with 27 additions and 0 deletions

View file

@ -318,6 +318,24 @@ with:
</details>
### `verify`
(optional)
If set to true and the action verify the configuration file against the JSONSchema.
<details>
<summary>Example</summary>
```yml
uses: golangci/golangci-lint-action@v6
with:
verify: true
# ...
```
</details>
### `only-new-issues`
(optional)

View file

@ -22,6 +22,10 @@ inputs:
description: "the token is used for fetching patch of a pull request to show only new issues"
default: ${{ github.token }}
required: false
verify:
description: "if set to true and the action verify the configuration file against the JSONSchema"
default: 'false'
required: false
only-new-issues:
description: "if set to true and the action runs on a pull request - the action outputs only newly found issues"
default: 'false'

View file

@ -51,6 +51,11 @@ async function runLint(binPath: string, patchPath: string): Promise<void> {
printOutput(res)
}
if (core.getBooleanInput(`verify`, { required: true })) {
const res = await execShellCommand(`${binPath} verify`)
printOutput(res)
}
let userArgs = core.getInput(`args`)
const addedArgs: string[] = []