Skip to content

Commit 61768a8

Browse files
committed
Close jwgmeligmeyling#9: adding a threshold parameter
step is marked as failure when threshold param is lower then current uploaded failures
1 parent 875e3b6 commit 61768a8

9 files changed

Lines changed: 35959 additions & 38998 deletions

File tree

.eslintrc.json

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"plugins": ["jest", "@typescript-eslint"],
3-
"extends": ["plugin:github/recommended"],
3+
"extends": ["plugin:github/typescript"],
44
"parser": "@typescript-eslint/parser",
55
"parserOptions": {
66
"ecmaVersion": 9,
@@ -16,11 +16,38 @@
1616
"@typescript-eslint/no-require-imports": "error",
1717
"@typescript-eslint/array-type": "error",
1818
"@typescript-eslint/await-thenable": "error",
19-
"@typescript-eslint/ban-ts-comment": "error",
19+
"@typescript-eslint/ban-ts-comment": [
20+
"error",
21+
{
22+
"ts-expect-error": "allow-with-description",
23+
"ts-ignore": true,
24+
"ts-nocheck": true,
25+
"ts-check": false,
26+
"minimumDescriptionLength": 5
27+
}
28+
],
2029
"camelcase": "off",
30+
"@typescript-eslint/camelcase": "off",
2131
"@typescript-eslint/consistent-type-assertions": "error",
2232
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
2333
"@typescript-eslint/func-call-spacing": ["error", "never"],
34+
"@typescript-eslint/naming-convention": [
35+
"error",
36+
{
37+
"selector": "variable",
38+
"format": ["camelCase", "UPPER_CASE"]
39+
},
40+
// {
41+
// "selector": "variable",
42+
// "modifiers": ["const"],
43+
// "format": ["UPPER_CASE"]
44+
// },
45+
{
46+
"selector": "typeParameter",
47+
"format": ["PascalCase"],
48+
"prefix": ["T"]
49+
}
50+
],
2451
"@typescript-eslint/no-array-constructor": "error",
2552
"@typescript-eslint/no-empty-interface": "error",
2653
"@typescript-eslint/no-explicit-any": "error",

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Optional. Title for the check run to create. Defaults to `SpotBugs Source Code A
2424
### `token`
2525
Optional. GitHub API access token. Defaults to `${{ github.token }}`, which is set by `actions/checkout@v2` minimally.
2626

27+
### `threshold`
28+
Optional. Configures the threshold when this job is marked as failed if to many finding. Defaults to `0`.
29+
2730
## Example usage
2831

2932
```yaml
@@ -117,3 +120,8 @@ $ npm test
117120

118121
...
119122
```
123+
124+
Before creating the PullRequest make sure you executed all
125+
```
126+
npm run all
127+
```

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ inputs:
2020
Also when generating a new PAT, select the least scopes necessary.
2121
[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)
2222
default: ${{ github.token }}
23+
threshold:
24+
description: 'Configures the threshold when this job is marked as failed if to many finding'
25+
default: 0
2326
runs:
2427
using: 'node12'
2528
main: 'dist/index.js'

0 commit comments

Comments
 (0)