Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/irgaly/danger-sarif
Danger plugin for reporting SARIF file.
https://github.com/irgaly/danger-sarif
ci danger ruby-gem
Last synced: about 1 month ago
JSON representation
Danger plugin for reporting SARIF file.
- Host: GitHub
- URL: https://github.com/irgaly/danger-sarif
- Owner: irgaly
- License: other
- Created: 2023-08-27T12:19:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-07T16:12:39.000Z (about 1 year ago)
- Last Synced: 2024-05-01T13:46:09.337Z (8 months ago)
- Topics: ci, danger, ruby-gem
- Language: Ruby
- Homepage:
- Size: 41 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-danger - danger-sarif - Danger plugin for reporting SARIF file. (Plugins / Ruby (danger))
README
# danger-sarif
[![Gem Version](https://badge.fury.io/rb/danger-sarif.svg)](https://badge.fury.io/rb/danger-sarif)
[Danger](https://github.com/danger/danger) plugin for reporting [SARIF](https://sarifweb.azurewebsites.net/) file.
## Installation
```shell
$ gem install danger-sarif
```## Usage
report from SARIF file
```ruby
# Dangerfile
sarif.report 'app/build/reports/lint-results-debug.sarif'
```report from multiple SARIF files
```ruby
# Dangerfile
Dir['**/build/reports/lint-results-*.sarif'].each do |file|
sarif.report file
end
```## Options
| option | description |
|-----------------------|--------------------------------------------------------------------|
| `sarif.fail_on_error` | Set the behavior that treating error as fail or not. default: true |```ruby
# Dangerfile
sarif.fail_on_error false
sarif.report '...'
```## Development
1. Clone this repo
2. Run `bundle install` to setup dependencies.
3. Make your changes.
4. Run `bundle exec rake spec` to run the tests.