Skip to content
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Commit Lint
uses: webiny/action-conventional-commits@v1.0.5
- name: Secrets Scan
uses: max/secret-scan@master
with:
exclude_path: 'secret-scan-exclude.txt'
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Shell Lint
uses: luizm/action-sh-checker@master
env:
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ on the merge request.

- [Installation](#installation)
- [Options](#options)
- [GitLab](#gitlab)
- [Local Development](#local-development)
- [Testing](#testing)
- [Conventional Commits](#conventional-commits)
Expand Down Expand Up @@ -86,6 +87,24 @@ The following command line options are available for configuration:
| -o, --output \<output> | ./gl-code-quality-report.json | Filepath for the GitLab Code Quality report output |
| -h, --help | | display help for command |

## GitLab

`gl-code-quality-openapi-validator` is intended to be used as part of a GitLab CI/CD pipeline job. The following code
snippet provides an example job declaration.

```yaml
openapi-validation:
stage: code-quality
image: node:latest
script:
- npm install -g ibm-openapi-validator @ibm-cloud/openapi-ruleset gl-code-quality-openapi-validator
- lint-openapi --json ./openapi-specification.yml >> openapi-validator-report.json
- gl-code-quality-openapi-validator -s ./openapi-specification.yml
artifacts:
reports:
codequality: gl-code-quality-report.json
```

## Local Development

### Prerequisites
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-security": "^1.5.0",
"jest": "^28.1.1",
"prettier": "^2.6.2"
"prettier": "^2.7.1"
}
}
4 changes: 0 additions & 4 deletions secret-scan-exclude.txt

This file was deleted.