mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-13 06:21:15 +00:00
feat: verify with the JSONSchema
This commit is contained in:
parent
47d1bdb762
commit
646655a0f0
3 changed files with 27 additions and 0 deletions
18
README.md
18
README.md
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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[] = []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue