diff --git a/packages/core/README.md b/packages/core/README.md index ac8ced92..1b85e5c8 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -170,6 +170,22 @@ export interface AnnotationProperties { } ``` +Example: + +```js +core.error( + 'This is a bad error seen in file.', + { + title: "Unexecpted Error", + file: "path/to/errored-file.js", + startLine: 1, + endLine: 2, + startColumn: 1, + endColumn: 10, + } +) +``` + #### Styling output Colored output is supported in the Action logs via standard [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). 3/4 bit, 8 bit and 24 bit colors are all supported. @@ -483,4 +499,4 @@ core.summary.emptyBuffer() // Writes text in the buffer to the summary buffer file and empties the buffer, optionally overwriting all existing content in the summary file with buffer contents. Defaults to false. core.summary.write({overwrite: true}) -``` \ No newline at end of file +```