Skip to content

Commit

Permalink
Lint scripts, configs and docs (#178)
Browse files Browse the repository at this point in the history
* Run prettier on all the scripts
* Run prettier on JS API docs
* Run prettier on markdown and YAML files
* Dry run prettier
  • Loading branch information
mostafa authored Nov 21, 2022
1 parent 120d70d commit 5f84d1c
Show file tree
Hide file tree
Showing 44 changed files with 1,391 additions and 1,342 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: "1.18"

- name: Install xk6 and build xk6-kafka for different platforms 🏗️
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand Down Expand Up @@ -86,19 +86,19 @@ jobs:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
format: 'sarif'
output: 'trivy-results.sarif'
scan-type: "fs"
format: "sarif"
output: "trivy-results.sarif"
exit-code: 1
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
severity: "CRITICAL,HIGH"
skip-dirs: "fixtures"

- name: Upload Trivy scan results to GitHub Security tab ⬆️
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: 'trivy-results.sarif'
sarif_file: "trivy-results.sarif"

- name: Scan Docker image with Syft and generate SBOM 🦉
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ jobs:
- name: Install Go 🧑‍💻
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: "1.18"

- name: Run prettier for linting scripts, configs and docs 🧹
uses: creyD/[email protected]
with:
dry: True

- name: Lint code issues 🚨
uses: golangci/golangci-lint-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .golanci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ linters:
- exhaustruct
- gocognit
- gochecknoinits
- gocyclo
- gocyclo
Loading

0 comments on commit 5f84d1c

Please sign in to comment.