From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 7B71A526FA5; Tue, 11 Jul 2023 19:53:15 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 7B71A526FA5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1689094395; bh=k06dtTGZ4oPdheVUyaReOF6HedQ1weofCPE4T2hbqDA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=alD/DRypNnrF5NDT5eClmIkw4XnKdqgPnx6OMPTGc19dvR4WGG1BL14b+rC2pqlA+ cf51KphSilbLmUB3smj0SOtyXOLxX6PpQCkD2XftIIvYzAAMvVcsGh79Sqbl7+09ht /izhcbtQApSLWtCawVhX+eHcA1esmEyiAixbBBVM= Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C91C049C081 for ; Tue, 11 Jul 2023 19:52:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C91C049C081 Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-4fb9fd28025so8976081e87.2 for ; Tue, 11 Jul 2023 09:52:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689094348; x=1691686348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PoqP+YJmlliquyB0mLemKYycEdHjHF8Ng7WRHZQRNYw=; b=hDY4fvVe17/71kbigyjMo2C8qpzCAhod7KD/bcPeP1ceSZEIyU4EAdNM9TSZGrmHNN rHDVzFHOIPQUv07CfJn4oAuBDCcAJqvg8y7XuYrY4dH+L7DW3kEs3FAfnBqAwsTNfDci KP4ZONE+hwkAFkemm1Pcq8jWcnXuDP2t3Pyglu6GKGz12AcBY7JP1LYcZknR82t+SWO5 34DjrgawFDQf3sg/kImgRE5Cxd9vyicgaTS2cYnw+h5eISma944JUyTS3wg498IKK0t/ +f2CwesYJA5fnSoooLyd9IIvlHQXQUiqQYY5O+koi/g1WRaXXwIEVoVvxDgyoNt5qNX4 0sxA== X-Gm-Message-State: ABy/qLaU0PxK0FRF2O1edOx9pML2XCW8xot0aEV9nmLg3cHiprrMTBkJ 5agU8PgU+94BXvGpLYkGbBtGtOTTJVY= X-Google-Smtp-Source: APBJJlFboQ0zy044x6UIId/M6fdKGnVOoDPyeUZtfwp8/BETh2iIRFBsVa6BezqJzQFGXE8zQA9dJw== X-Received: by 2002:a19:5f5d:0:b0:4f9:607a:6508 with SMTP id a29-20020a195f5d000000b004f9607a6508mr13017998lfj.50.1689094347741; Tue, 11 Jul 2023 09:52:27 -0700 (PDT) Received: from pony.. ([31.173.86.237]) by smtp.gmail.com with ESMTPSA id q30-20020ac2511e000000b004fbdeca7b79sm378125lfb.247.2023.07.11.09.52.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 09:52:27 -0700 (PDT) To: tarantool-patches@dev.tarantool.org, Sergey Kaplun , Maxim Kokryashkin Date: Tue, 11 Jul 2023 19:51:34 +0300 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/2] ci: enable checkpatch X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Sergey Bronnikov Patch enables checkpatch [1] for checking patch on a pre-commit stage. In Tarantool we use our own fork of checkpatch [2] with additional check types. It's logical to use it in a LuaJIT development. We don't need check tags in commit messages like NO_DOC, NO_CHANGELOG, NO_TEST and others, so to be able to customize command-line options Github Action, provided by checkpatch repository [3], was added to the repository. See documentation for used checkpatch in [4]. 1. https://docs.kernel.org/dev-tools/checkpatch.html 2. https://github.com/tarantool/checkpatch 3. https://github.com/tarantool/checkpatch/blob/master/.github/actions/checkpatch/action.yml 4. https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst --- .github/actions/checkpatch/action.yml | 17 +++++++++++++++++ .github/workflows/lint.yml | 14 ++++++++++++++ 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..df2e2a2b --- /dev/null +++ b/.github/actions/checkpatch/action.yml @@ -0,0 +1,17 @@ +name: Checkpatch +description: Check patches against LuaJIT development guidelines +inputs: + revision-range: + description: Git revision range to check + required: true +runs: + using: composite + steps: + - uses: actions/checkout@v3 + with: + repository: tarantool/checkpatch + path: 'checkpatch' + - run: apt install -y codespell + shell: bash + - run: checkpatch/checkpatch.pl --codespell --color=always --show-types --git ${{ inputs.revision-range }} --codespellfile /usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt --ignore NO_CHANGELOG,NO_DOC,NO_TEST,COMMIT_LOG_LONG_LINE + shell: bash diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 71ceee9a..d28aa15b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -53,3 +53,17 @@ jobs: - name: test run: cmake --build . --target LuaJIT-luacheck working-directory: ${{ env.BUILDDIR }} + + checkpatch: + runs-on: [self-hosted, lightweight, Linux, x86_64] + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + # ref: ${{ github.event.pull_request.head.sha }} + submodules: recursive + - name: checkpatch + uses: ./.github/actions/checkpatch + with: + revision-range: HEAD~${{ github.event.pull_request.commits }}..HEAD -- 2.34.1