Skip to content

Commit 538b7f0

Browse files
committed
update plugins docs
1 parent 59da986 commit 538b7f0

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

PLUGINS.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,23 @@ This is the [playwright page](https://playwright.dev/docs/api/class-page) instan
1818

1919
#### `addFinding`
2020

21-
This is a function that will add a finding to the list. Findings are used to generate and file issues. This function has 2 arguments:
21+
A function that will add a finding to the list (findings are used to generate and file issues). It will also generate a screenshot and add the `screenshotId` to the finding data if `includeScreenshots` is true in either the scanner action input OR in the arguments to this function (see below). It has the following arguments:
2222

23-
1. An object that should match the [`Finding` type](https://github.com/github/accessibility-scanner/blob/main/.github/actions/find/src/types.d.ts#L1-L9).
24-
2. An 'options' object that has an optional `includeScreenshots` field. This function will automatically generate a screenshot and add the screenshotId to the `Finding` data if `includeScreenshots` is true in either the action input, or in the options field of this function.
23+
- An object that should match the [`Finding` type](https://github.com/github/accessibility-scanner/blob/main/.github/actions/find/src/types.d.ts#L1-L9).
24+
- An [optional] 'options' object that has the following fields:
25+
- [optional] `includeScreenshots` <bool>: Will automatically generate a screenshot and add the screenshotId to the `Finding` data if it's set to true.
26+
27+
Example usage:
28+
29+
```
30+
addFinding({ ...findingTypeData })
31+
addFinding({
32+
...findingTypeData
33+
}, {
34+
includeScreenshots: true
35+
})
36+
37+
```
2538

2639
## How to create plugins
2740

0 commit comments

Comments
 (0)