Skip to content

Commit

Permalink
Adds markdownlint and yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
san983 committed Jan 28, 2025
1 parent 3841e31 commit 9550182
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 20 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,34 @@ name: CI
on:
pull_request:
push:
branches: [ "main" ]
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
markdownlint-cli:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Run markdownlint-cli
uses: nosborn/[email protected]
with:
files: .
config_file: ".markdownlint.yaml"

yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Run YAML Lint
uses: actionshub/yamllint@main

build:
name: Build
runs-on: ubuntu-22.04
Expand Down
5 changes: 5 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: true
line-length: false

MD046: false
10 changes: 10 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
extends: default
rules:
document-start: false
line-length:
max: 256
level: warning
truthy:
ignore: |
/.github/workflows/*.yml
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The following instructions uses `$VERSION` as a placeholder, where `$VERSION` is
git push origin --tags
```

1. GitHub actions will take it from there and release to https://hex.pm/packages/bugsnag_erlang
1. GitHub actions will take it from there and release to <https://hex.pm/packages/bugsnag_erlang>

## Tests

Expand Down
3 changes: 1 addition & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Copyright (c) 2013-2019 Anthony Eden
# Copyright (c) 2013-2019 Anthony Eden

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Bugsnag notifier for Erlang applications.
# Bugsnag notifier for Erlang applications

## Dependencies

Expand All @@ -10,7 +10,7 @@ The following applications must be started:

## Usage

You may send custom errors directly:
You may send custom errors directly

```erlang
bugsnag:notify(error, fake, "Testing bugsnag with a manual error report", no_module, 0).
Expand All @@ -30,21 +30,21 @@ bugsnag:test_error().

When embedding, make sure to set up the configuration elements in your sys.config (or other config file):

```erlang
[
{bugsnag_erlang, [
{error_logger, true},
{api_key, "ENTER_API_KEY"},
{release_state, "development"}
]}
].
```
```erlang
[
{bugsnag_erlang, [
{error_logger, true},
{api_key, "ENTER_API_KEY"},
{release_state, "development"}
]}
].
```

And start the application:

```erlang
application:start(bugsnag)
```
```erlang
application:start(bugsnag)
```

Or add the application to your .app configuration.

Expand All @@ -54,9 +54,11 @@ We also provide a [lager](https://github.com/basho/lager) to report anything
above a certain level (by default, `error`) to Bugsnag.

For example, simply add
```

```erlang
{bugsnag_lager_handler, critical}
```

to your lager handler config.

## Formatting
Expand All @@ -69,4 +71,4 @@ make format

## Thanks

Thank you to Ken Pratt: his library https://github.com/kenpratt/erlbrake provided a lot of code for this library.
Thank you to Ken Pratt: his library <https://github.com/kenpratt/erlbrake> provided a lot of code for this library.

0 comments on commit 9550182

Please sign in to comment.