Skip to content

Commit

Permalink
Close #9: adding a threshold parameter
Browse files Browse the repository at this point in the history
step is marked as failure when threshold param is lower then current
uploaded failures
  • Loading branch information
arolfes committed Sep 22, 2021
1 parent 7b58275 commit 5250b5c
Show file tree
Hide file tree
Showing 10 changed files with 3,463 additions and 9,237 deletions.
31 changes: 29 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"extends": ["plugin:github/typescript"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
Expand All @@ -16,11 +16,38 @@
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"ts-ignore": true,
"ts-nocheck": true,
"ts-check": false,
"minimumDescriptionLength": 5
}
],
"camelcase": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"]
},
// {
// "selector": "variable",
// "modifiers": ["const"],
// "format": ["UPPER_CASE"]
// },
{
"selector": "typeParameter",
"format": ["PascalCase"],
"prefix": ["T"]
}
],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Optional. Title for the check run to create. Defaults to `SpotBugs Source Code A
### `token`
Optional. GitHub API access token. Defaults to `${{ github.token }}`, which is set by `actions/checkout@v2` minimally.

### `threshold`
Optional. Configures the threshold when this job is marked as failed if to many finding. Defaults to `0`.

## Example usage

```yaml
Expand Down Expand Up @@ -117,3 +120,8 @@ $ npm test

...
```

Before creating the PullRequest make sure you executed all
```
npm run all
```
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ inputs:
Also when generating a new PAT, select the least scopes necessary.
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
default: ${{ github.token }}
threshold:
description: 'Configures the threshold when this job is marked as failed if to many finding'
default: 0
runs:
using: 'node12'
main: 'dist/index.js'
Expand Down
50 changes: 37 additions & 13 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 5250b5c

Please sign in to comment.