Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lint action #3

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on: [pull_request]

jobs:
lint-addon-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: lint
run: NODE=$(which node) make lint-addon-docs

lint-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: lint
run: make lint-cpp

lint-md:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: lint
run: NODE=$(which node) make lint-md

lint-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: lint
run: NODE=$(which node) make lint-js
8 changes: 4 additions & 4 deletions doc/api/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Delivers a JSON-formatted diagnostic summary, written to a file.

The report is intended for development, test and production use, to capture
and preserve information for problem determination. It includes JavaScript
and preserve information for problem determination. Note that it includes JavaScript
and native stack traces, heap statistics, platform information, resource
usage etc. With the report option enabled, diagnostic reports can be triggered
on unhandled exceptions, fatal errors and user signals, in addition to
Expand All @@ -22,7 +22,7 @@ is provided below for reference.
```json
{
"header": {
"reportVersion": 1,
"reportVersion": 1,
"event": "exception",
"trigger": "Exception",
"filename": "report.20181221.005011.8974.0.001.json",
Expand Down Expand Up @@ -435,7 +435,7 @@ written.
A report can also be triggered via an API call from a JavaScript application:

```js
process.report.writeReport();
process.report.writeReport( );
```

This function takes an optional additional argument `filename`, which is
Expand All @@ -446,7 +446,7 @@ process.report.writeReport('./foo.json');
```

This function takes an optional additional argument `err` which is an `Error`
object that will be used as the context for the JavaScript stack printed in the
object that will be used as the context for the Javascript stack printed in the
report. When using report to handle errors in a callback or an exception
handler, this allows the report to include the location of the original error as
well as where it was handled.
Expand Down
3 changes: 2 additions & 1 deletion lib/internal/process/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ function signalHandler(sig) {
nr.writeReport(sig, 'Signal', null, '');
}


module.exports = {
addSignalHandler,
report
report
};
1 change: 1 addition & 0 deletions src/node_report.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ using v8::StackTrace;
using v8::String;
using v8::V8;
using v8::Value;
using v8::Function;

// Internal/static function declarations
static void WriteNodeReport(Isolate* isolate,
Expand Down