Skip to content

Commit

Permalink
Squash GHA checkers (#1435)
Browse files Browse the repository at this point in the history
Signed-off-by: Renato Foot <[email protected]>
  • Loading branch information
Costallat authored Jul 5, 2020
1 parent 3fa2eb0 commit 32940e4
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 182 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/cpp-linter.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/workflows/lua-linter.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/lua-syntax.yml

This file was deleted.

73 changes: 73 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Review
on: [pull_request]
jobs:
reviewers:
runs-on: ubuntu-latest
steps:
- name: Update
run: sudo apt-get update

- name: Setup Lua
run: sudo apt-get install -y lua5.1 liblua5.1-0-dev

- name: Setup Luacheck
run: sudo apt-get install -y lua-check

- name: Setup xmllint
run: sudo apt-get update && sudo apt-get install -y libxml2-utils

- name: Setup cppcheck
run: sudo apt-get install -y cppcheck

- name: Check out code.
uses: actions/checkout@v1

- name: Setup reviewdog
run: |
mkdir -p $HOME/bin && curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $HOME/bin
echo ::add-path::$HOME/bin
- name: misspell
uses: reviewdog/action-misspell@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
locale: "US"
reporter: github-pr-check

- name: cpplint
uses: reviewdog/action-cpplint@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check

- name: cppcheck
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ${{ runner.workspace }}/otservbr-global
cppcheck --version
reviewdog -reporter=github-pr-check -runners=cppcheck
- name: luacheck
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
luacheck --version
cd ${{ runner.workspace }}/otservbr-global
reviewdog -reporter=github-pr-check -runners=luacheck
- name: luac
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ${{ runner.workspace }}/otservbr-global
luac -v
reviewdog -reporter=github-pr-check -runners=luac
- name: xmllint
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd ${{ runner.workspace }}/otservbr-global
xmllint --version
reviewdog -reporter=github-pr-check -runners=xmllint
32 changes: 0 additions & 32 deletions .github/workflows/xml-syntax.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
runner:

cppcheck:
cmd: cppcheck --enable=all --template="{file}:{line}:{message}" src/
errorformat:
- "%f:%l:%m"
level: warning

luacheck:
cmd: luacheck --formatter=plain --no-color --no-config --no-global --no-unused --no-unused-args --no-cache -d ./data/
errorformat:
- "%f:%l:%c: %m"
level: warning

luac:
cmd: find data/ -name '*.lua' -exec luac -p {} \;
errorformat:
- "%r: %f:%l: %m"
level: warning

xmllint:
cmd: find data/ -name '*.xml' -exec xmllint --noout {} \;
errorformat:
- "%f:%l: %m"
level: warning
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
[![Build on Ubuntu](https://github.com/opentibiabr/otservbr-global/workflows/Build%20on%20Ubuntu/badge.svg)](https://github.com/opentibiabr/otservbr-global/actions?query=workflow%3A%22Build+on+Ubuntu%22)
[![Build on Windows](https://github.com/opentibiabr/otservbr-global/workflows/Build%20on%20Windows/badge.svg)](https://github.com/opentibiabr/otservbr-global/actions?query=workflow%3A%22Build+on+Windows%22)

## Syntax/Linters
[![C++ linter](https://github.com/opentibiabr/otservbr-global/workflows/C++%20linter/badge.svg)](https://github.com/opentibiabr/otservbr-global/actions?query=workflow%3A%22C%2B%2B+linter%22)

[![Lua linter](https://github.com/opentibiabr/otservbr-global/workflows/Lua%20linter/badge.svg)](https://github.com/opentibiabr/otservbr-global/actions?query=workflow%3A%22Lua+linter%22)
[![Lua syntax check](https://github.com/opentibiabr/otservbr-global/workflows/Lua%20syntax%20check/badge.svg)](https://github.com/opentibiabr/otservbr-global/actions?query=workflow%3A%22Lua+syntax+check%22)

[![XML syntax check](https://github.com/opentibiabr/otservbr-global/workflows/XML%20syntax%20check/badge.svg)](https://github.com/opentibiabr/otservbr-global/actions?query=workflow%3A%22XML+syntax+check%22)

## Docs/Help
[![Documentation](https://codedocs.xyz/Costallat/otservbr-global.svg)](https://codedocs.xyz/Costallat/otservbr-global/)
[![Discord Channel](https://img.shields.io/discord/528117503952551936.svg?label=discord)](https://discord.gg/3NxYnyV)
Expand Down

0 comments on commit 32940e4

Please sign in to comment.