mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2025-12-15 23:26:31 +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>
|
</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`
|
### `only-new-issues`
|
||||||
|
|
||||||
(optional)
|
(optional)
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@ inputs:
|
||||||
description: "the token is used for fetching patch of a pull request to show only new issues"
|
description: "the token is used for fetching patch of a pull request to show only new issues"
|
||||||
default: ${{ github.token }}
|
default: ${{ github.token }}
|
||||||
required: false
|
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:
|
only-new-issues:
|
||||||
description: "if set to true and the action runs on a pull request - the action outputs only newly found issues"
|
description: "if set to true and the action runs on a pull request - the action outputs only newly found issues"
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,11 @@ async function runLint(binPath: string, patchPath: string): Promise<void> {
|
||||||
printOutput(res)
|
printOutput(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (core.getBooleanInput(`verify`, { required: true })) {
|
||||||
|
const res = await execShellCommand(`${binPath} verify`)
|
||||||
|
printOutput(res)
|
||||||
|
}
|
||||||
|
|
||||||
let userArgs = core.getInput(`args`)
|
let userArgs = core.getInput(`args`)
|
||||||
const addedArgs: string[] = []
|
const addedArgs: string[] = []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue