-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fl-kasun-merge
- Loading branch information
Showing
3 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Style Check | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
style-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install tools | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y --no-install-recommends cpplint shfmt | ||
sudo wget https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 -O /bin/hadolint && sudo chmod +x /bin/hadolint | ||
pip install install pylint | ||
- name: cpplint check | ||
if: ${{!contains(github.event.pull_request.labels.*.name, 'Skip cpplint Check')}} | ||
run: cpplint --linelength=120 --filter=-build,-runtime,-readability/todo,-whitespace/todo,-readability/casting,-readability/braces,-readability/fn_size,-legal/copyright --exclude=./src/util/sqlite3/ --recursive . | ||
|
||
- name: pylint check | ||
if: ${{!contains(github.event.pull_request.labels.*.name, 'Skip pylint Check')}} | ||
run: pylint --recursive=y . | ||
|
||
- name: hadolint check | ||
if: ${{!contains(github.event.pull_request.labels.*.name, 'Skip hadolint Check')}} | ||
run: find . -type f -name '*Dockerfile*' -print0 | xargs -0 hadolint --ignore DL3008 -t warning | ||
|
||
- name: shfmt check | ||
if: ${{!contains(github.event.pull_request.labels.*.name, 'Skip shfmt Check')}} | ||
run: find . -type f -name '*.sh' -print0 | xargs -0 shfmt -d -s -i 4 -ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters