Skip to content

Commit 33d2171

Browse files
authored
add reviewdog (#135)
* ci: add reviewdog / eclint * ci: add reviewdog / yamllint * style: fix yamllint issues * ci: add reviewdog / actionlint * ci: add reviewdog / eslint
1 parent 1b07938 commit 33d2171

File tree

9 files changed

+114
-65
lines changed

9 files changed

+114
-65
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: 2
23
updates:
34
- package-ecosystem: npm

.github/workflows/actionlint.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: actionlint
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
actionlint:
9+
name: reviewdog / actionlint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: reviewdog/action-actionlint@v1
14+
with:
15+
reporter: github-pr-review

.github/workflows/codeql-analysis.yml

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
1+
---
122
name: "CodeQL"
133

144
on:
155
push:
16-
branches: [ main ]
6+
branches:
7+
- main
178
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [ main ]
9+
branches:
10+
- main
2011
schedule:
2112
- cron: '0 0 * * 6'
2213

@@ -28,44 +19,19 @@ jobs:
2819
actions: read
2920
contents: read
3021
security-events: write
31-
3222
strategy:
3323
fail-fast: false
3424
matrix:
35-
language: [ 'javascript' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37-
# Learn more:
38-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39-
25+
language:
26+
- javascript
4027
steps:
41-
- name: Checkout repository
42-
uses: actions/checkout@v2
43-
44-
# Initializes the CodeQL tools for scanning.
45-
- name: Initialize CodeQL
46-
uses: github/codeql-action/init@v1
47-
with:
48-
languages: ${{ matrix.language }}
49-
# If you wish to specify custom queries, you can do so here or in a config file.
50-
# By default, queries listed here will override any specified in a config file.
51-
# Prefix the list here with "+" to use these queries and those in the config file.
52-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53-
54-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55-
# If this step fails, then you should remove it and run the build manually (see below)
56-
- name: Autobuild
57-
uses: github/codeql-action/autobuild@v1
58-
59-
# ℹ️ Command-line programs to run using the OS shell.
60-
# 📚 https://git.io/JvXDl
61-
62-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63-
# and modify them (or add more) to build your code if your project
64-
# uses a compiled language
65-
66-
#- run: |
67-
# make bootstrap
68-
# make release
69-
70-
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v1
28+
- name: Checkout repository
29+
uses: actions/checkout@v2
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v1
32+
with:
33+
languages: ${{ matrix.language }}
34+
- name: Autobuild
35+
uses: github/codeql-action/autobuild@v1
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v1

.github/workflows/eclint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: eclint
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
eclint:
9+
name: reviewdog / eclint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: eclint
14+
uses: reviewdog/action-eclint@v1
15+
with:
16+
reporter: github-pr-review

.github/workflows/node.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
1+
---
42
name: Node.js CI
53

64
on:
7-
push:
8-
branches: [ main ]
95
pull_request:
106

117
jobs:
12-
lint:
8+
eslint:
9+
name: reviewdog / eslint
10+
if: ${{ github.event_name == 'pull_request' }}
1311
runs-on: ubuntu-latest
1412
strategy:
1513
matrix:
16-
node-version: [14.x]
14+
node-version:
15+
- 14.x
1716
steps:
18-
- uses: actions/checkout@v2
19-
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: ${{ matrix.node-version }}
23-
- run: yarn
24-
- run: yarn lint
17+
- uses: actions/checkout@v2
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
- run: yarn install
23+
- uses: reviewdog/action-eslint@v1
24+
with:
25+
reporter: github-pr-review

.github/workflows/pr-labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
name: Pull Request Labeler
3+
34
on:
45
pull_request:
6+
57
jobs:
68
pr-labeler:
79
runs-on: ubuntu-latest

.github/workflows/sync_labels.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
name: Sync lables
3+
34
on:
45
push:
56
paths:
67
- .github/workflows/sync_labels.yml
78
- .github/labels.yml
9+
810
jobs:
911
sync_labels:
1012
name: Sync Labels

.github/workflows/yamllint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: yamllint
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
eclint:
9+
name: reviewdog / yamllint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: eclint
14+
uses: reviewdog/action-yamllint@v1
15+
with:
16+
reporter: github-pr-review

.yamllint.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
rules:
3+
braces:
4+
forbid: true
5+
brackets:
6+
forbid: true
7+
colons: enable
8+
commas: enable
9+
comments:
10+
level: warning
11+
comments-indentation:
12+
level: warning
13+
document-end: disable
14+
document-start:
15+
level: warning
16+
empty-lines: enable
17+
empty-values: disable
18+
hyphens: enable
19+
indentation: enable
20+
key-duplicates: enable
21+
key-ordering: disable
22+
line-length: enable
23+
new-line-at-end-of-file: enable
24+
new-lines: enable
25+
octal-values: disable
26+
quoted-strings: disable
27+
trailing-spaces: enable
28+
truthy: disable
29+
ignore: |
30+
node_modules

0 commit comments

Comments
 (0)