[Tarantool-patches] [PATCH 4/4][v2] ci: enable checkpatch

Maxim Kokryashkin m.kokryashkin at tarantool.org
Mon Jul 17 21:48:30 MSK 2023


Hi, Sergey!
Thanks for the patch!
Please consider my comments below.
 
> 
>>From: Sergey Bronnikov < sergeyb at tarantool.org >
>>
>>Patch enables running checkpatch [1] for checking patch on a pre-commit
>The pre-commit stage makes no sense when we are talking about CI — the
>commit has already occurred. That’s just a conventional workflow configuration.
> 
>Having that in mind, along with some grammar related issues. I suggest
>rephrasing it like:
>| Patch adds a CI workflow with the checkpatch[1] run.
>>stage.
>>
>>1.  https://github.com/tarantool/checkpatch
>>---
>> .github/actions/checkpatch/action.yml | 11 +++++++++++
>> .github/workflows/lint.yml | 20 ++++++++++++++++++++
>> 2 files changed, 31 insertions(+)
>> create mode 100644 .github/actions/checkpatch/action.yml
>>
>>diff --git a/.github/actions/checkpatch/action.yml b/.github/actions/checkpatch/action.yml
>>new file mode 100644
>>index 00000000..2336fb15
>>--- /dev/null
>>+++ b/.github/actions/checkpatch/action.yml
>>@@ -0,0 +1,11 @@
>>+name: Checkpatch
>>+description: Check patches against LuaJIT development guidelines
>I think it’s better to change the action name to `Setup checkpatch`,
>since the actual run is not performed here.
>The description should be updated correspondingly. Also, AFAIK, there
>is no such thing as `LuaJIT guidelines`, so maybe it’s better to change it
>to `Tarantool guidelines` if you want to keep that part.
>>+runs:
>>+ using: composite
>>+ steps:
>>+ - uses: actions/checkout at v3
>>+ with:
>>+ repository: tarantool/checkpatch
>>+ path: 'checkpatch'
>>+ - run: apt install -y codespell
>>+ shell: bash
>>diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
>>index 44338f6d..d86c5d54 100644
>>--- a/.github/workflows/lint.yml
>>+++ b/.github/workflows/lint.yml
>>@@ -53,3 +53,23 @@ jobs:
>>       - name: luacheck
>>         run: cmake --build . --target LuaJIT-luacheck
>>         working-directory: ${{ env.BUILDDIR }}
>>+
>>+ checkpatch:
>>+ runs-on: [self-hosted, lightweight, Linux, x86_64]
>>+
>>+ steps:
>>+ - uses: actions/checkout at v3
>>+ with:
>>+ fetch-depth: 0
>>+ submodules: recursive
>>+ - name: checkpatch
>>+ uses: ./.github/actions/checkpatch
>>+ - name: environment
>>+ uses: ./.github/actions/setup
>>+ - name: make tarantool/master available
>>+ run: git checkout tarantool/master && git checkout -
>>+ - name: configure
>>+ run: cmake -S . -B ${{ env.BUILDDIR }}
>>+ - name: checkpatch
>>+ run: cmake --build . --target LuaJIT-checkpatch
>>+ working-directory: ${{ env.BUILDDIR }}
>>--
>>2.34.1
>--
>Best regards,
>Maxim Kokryashkin
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20230717/00889b34/attachment.htm>


More information about the Tarantool-patches mailing list