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 559655872E0; Fri, 4 Aug 2023 13:56:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 559655872E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691146619; bh=hQZ4kXGjca1TQnvJ/jg1FUP/fkN5tEzNoi4WMs6FsKg=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=hyWXxP3xF3msmVmkRqwuQawFQDIHseIdhGy9PX53LJ2l+fouxWoYoKyNmvb8pGASR H7Twlsq8JHabNhXiWfOhnmuM/hURDytuqJVEFhPQV6qTkfx175Osf6CiQ73Zg/70yi n7kU4r3OBKpmkHRmL1aC0ZRJYcopalxH5LaTliV8= Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [95.163.41.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 9A3045872E0 for ; Fri, 4 Aug 2023 13:56:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9A3045872E0 Received: by smtp63.i.mail.ru with esmtpa (envelope-from ) id 1qRsUJ-00Gr1M-2v; Fri, 04 Aug 2023 13:56:56 +0300 Content-Type: multipart/alternative; boundary="------------0GEw94n6wSISRX0jcgAufcd4" Message-ID: <0b5bc26f-cf20-2b13-ce53-c1a5ebeabe5d@tarantool.org> Date: Fri, 4 Aug 2023 13:56:55 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: Maxim Kokryashkin , Sergey Bronnikov Cc: max.kokryashkin@gmail.com, tarantool-patches@dev.tarantool.org References: <1691091489.404344804@f148.i.mail.ru> In-Reply-To: <1691091489.404344804@f148.i.mail.ru> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC86EE92E42F0C271DDC310B0E58918727B182A05F538085040B2ED04CA57B204E54631F9F0CC1287A2B967128A396EDAA7BC77B4210FEEAB0D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C6068CE86C2B75F5EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637429436EB3A52E9348638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8037D51F7A95449B178BA5179E627EEE9117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F4460429728776938767073520437C869540D2AB0F28451B159A507268D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EECCD848CCB6FE560CFCE65BE3358055BDD8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3B6FBD635917D924D03F1AB874ED89028C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947CB11811A4A51E3B096D1867E19FE1407978DA827A17800CE705056152E029236E2DBA43225CD8A89F616AD31D0D18CD5C57739F23D657EF2BB5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5AA4FCA1FAD1BACC35F1548730AF003FFEF8BD1B3D25FCDA4F87CCE6106E1FC07E67D4AC08A07B9B0D2AC72D04CD5349BCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFE0A1B07B4D228FC7BC0C474238EBC14E7BCCCA73C56BA0B3406A4CAEF6C80BDEC7834276CD0523978553022043D0BC9AF0C970DB2F8C2A5632F862F4EE6B6BF7A74DFFEFA5DC0E7F02C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojrobneJv/JoV2Z+A0UvuuTQ== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A769D1750EC568DCBE234631F9F0CC1287A2CA71892AC981DD5FEBA65886582A37BD66FEC6BF5C9C28D98A98C1125256619760D574B6FC815AB872D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 3/5][v3] cmake: introduce new targets 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" This is a multi-part message in MIME format. --------------0GEw94n6wSISRX0jcgAufcd4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Max On 8/3/23 22:38, Maxim Kokryashkin via Tarantool-patches wrote: > Hi, Sergey! > Please consider my comments below. > > From: Sergey Bronnikov > > > In Tarantool we use our own fork of checkpatch [1] with > additional check > types. It's logical to use it in LuaJIT development. However, > we don't > need to enable all checks [2] implemented in checkpatch, > therefore a > number of checks are disabled. > > Patch introduces two new CMake targets: "LuaJIT-checkpatch", > that checks > patches on top of the master branch using script > checkpatch.pl, and > > Typo: s/using/using the/ > Fixed. > target "check", that combines LuaJIT-luacheck and > LuaJIT-checkpatch. By > default CMake looking for checkpatch.pl in a directory > "checkpatch" in > > Typo: s/looking/looks/ > Typo: s/in a directory/in the directory/ > Fixed. > > LuaJIT repository root directory and in a directories > specified in PATH. > > Typo: s/LuaJIT/the LuaJIT/ > Typo: s/a directories/directories/ > Fixed. > > 1. https://github.com/tarantool/checkpatch > 2. > https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst > --- >  test/CMakeLists.txt | 51 > +++++++++++++++++++++++++++++++++++++++++++++ >  1 file changed, 51 insertions(+) > > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt > index 47296a22..5ec0bed6 100644 > --- a/test/CMakeLists.txt > +++ b/test/CMakeLists.txt > @@ -42,6 +42,56 @@ else() >    ) >  endif() > > +find_program(CHECKPATCH checkpatch.pl > + HINTS ${PROJECT_SOURCE_DIR}/checkpatch) > +add_custom_target(${PROJECT_NAME}-checkpatch) > +set(MASTER_BRANCH "tarantool/master") > +if(CHECKPATCH) > + add_custom_command(TARGET ${PROJECT_NAME}-checkpatch > + COMMENT "Running checkpatch" > + COMMAND > + ${CHECKPATCH} > + # Description of supported checks in > + # > https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst > + --codespell > + --color=always > + --git ${MASTER_BRANCH}..HEAD > + --show-types > + --ignore BAD_SIGN_OFF > + --ignore BLOCK_COMMENT_STYLE > + --ignore CODE_INDENT > + --ignore COMMIT_LOG_LONG_LINE > + # Requires at least two lines in commit message and this > + # is annoying. > + --ignore COMMIT_MESSAGE > + --ignore CONSTANT_COMPARISON > + --ignore FUNCTION_NAME_NO_NEWLINE > + --ignore GIT_COMMIT_ID > + --ignore INCLUDE_GUARD > + --ignore LOGICAL_CONTINUATIONS > + --ignore LONG_LINE > + --ignore NO_CHANGELOG > + --ignore NO_DOC > + --ignore NO_TEST > + --ignore PREFER_DEFINED_ATTRIBUTE_MACRO > + --ignore SPACING > + --ignore SUSPECT_CODE_INDENT > + --ignore TABSTOP > + --ignore TRAILING_STATEMENTS > + --ignore UNCOMMENTED_DEFINITION > + --ignore UNSAFE_FUNCTION > + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} > + ) > +else() > > I suggest doing the same as with coverage — move that logic into a > separate module, > so the test/CMakeLists.txt remains readable and clean. > Done, force-pushed. commit 609f893ecc5ee9895916c637c145489fe59d9bb0 Author: Sergey Bronnikov Date:   Fri Aug 4 13:51:23 2023 +0300     cmake: checkpatch module diff --git a/CMakeLists.txt b/CMakeLists.txt index 0204e852..b1a442b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,9 +29,12 @@ endif()  set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +set(GIT_MASTER_BRANCH "tarantool/master") +  include(LuaJITUtils)  include(SetBuildParallelLevel)  include(SetVersion) +include(CheckPatch)  # --- Variables to be exported to child scopes --------------------------------- diff --git a/cmake/CheckPatch.cmake b/cmake/CheckPatch.cmake new file mode 100644 index 00000000..243ee426 --- /dev/null +++ b/cmake/CheckPatch.cmake @@ -0,0 +1,46 @@ +find_program(CHECKPATCH checkpatch.pl +             HINTS ${PROJECT_SOURCE_DIR}/checkpatch) +add_custom_target(${PROJECT_NAME}-checkpatch) +if(CHECKPATCH) +  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch +    COMMENT "Running checkpatch" +    COMMAND +      ${CHECKPATCH} +        # Description of supported checks in +        # https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst +        --codespell +        --color=always +        --git ${GIT_MASTER_BRANCH}..HEAD +        --show-types +        --ignore BAD_SIGN_OFF +        --ignore BLOCK_COMMENT_STYLE +        --ignore CODE_INDENT +        --ignore COMMIT_LOG_LONG_LINE +        # Requires at least two lines in commit message and this +        # is annoying. +        --ignore COMMIT_MESSAGE +        --ignore CONSTANT_COMPARISON +        --ignore FUNCTION_NAME_NO_NEWLINE +        --ignore GIT_COMMIT_ID +        --ignore INCLUDE_GUARD +        --ignore LOGICAL_CONTINUATIONS +        --ignore LONG_LINE +        --ignore NO_CHANGELOG +        --ignore NO_DOC +        --ignore NO_TEST +        --ignore PREFER_DEFINED_ATTRIBUTE_MACRO +        --ignore SPACING +        --ignore SUSPECT_CODE_INDENT +        --ignore TABSTOP +        --ignore TRAILING_STATEMENTS +        --ignore UNCOMMENTED_DEFINITION +        --ignore UNSAFE_FUNCTION +    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +  ) +else() +  set(MSG "`checkpatch.pl' is not found, so ${PROJECT_NAME}-checkpatch target is dummy") +  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch +    COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG} +    COMMENT ${MSG} +  ) +endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5ec0bed6..66f6ee77 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -42,52 +42,6 @@ else()    )  endif() -find_program(CHECKPATCH checkpatch.pl -             HINTS ${PROJECT_SOURCE_DIR}/checkpatch) -add_custom_target(${PROJECT_NAME}-checkpatch) -set(MASTER_BRANCH "tarantool/master") -if(CHECKPATCH) -  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch -    COMMENT "Running checkpatch" -    COMMAND -      ${CHECKPATCH} -        # Description of supported checks in -        # https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst -        --codespell -        --color=always -        --git ${MASTER_BRANCH}..HEAD -        --show-types -        --ignore BAD_SIGN_OFF -        --ignore BLOCK_COMMENT_STYLE -        --ignore CODE_INDENT -        --ignore COMMIT_LOG_LONG_LINE -        # Requires at least two lines in commit message and this -        # is annoying. -        --ignore COMMIT_MESSAGE -        --ignore CONSTANT_COMPARISON -        --ignore FUNCTION_NAME_NO_NEWLINE -        --ignore GIT_COMMIT_ID -        --ignore INCLUDE_GUARD -        --ignore LOGICAL_CONTINUATIONS -        --ignore LONG_LINE -        --ignore NO_CHANGELOG -        --ignore NO_DOC -        --ignore NO_TEST -        --ignore PREFER_DEFINED_ATTRIBUTE_MACRO -        --ignore SPACING -        --ignore SUSPECT_CODE_INDENT -        --ignore TABSTOP -        --ignore TRAILING_STATEMENTS -        --ignore UNCOMMENTED_DEFINITION -        --ignore UNSAFE_FUNCTION -    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} -  ) -else() -  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch -    COMMENT "`checkpatch.pl' is not found, so ${PROJECT_NAME}-checkpatch target is dummy" -  ) -endif() -  add_custom_target(check    DEPENDS ${PROJECT_NAME}-checkpatch ${PROJECT_NAME}-luacheck  ) > + add_custom_command(TARGET ${PROJECT_NAME}-checkpatch > + COMMENT "`checkpatch.pl' is not found, so > ${PROJECT_NAME}-checkpatch target is dummy" > + ) > +endif() > + > +add_custom_target(check > + DEPENDS ${PROJECT_NAME}-checkpatch ${PROJECT_NAME}-luacheck > +) > + >  set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e > dofile[[${LUAJIT_TEST_INIT}]]") >  separate_arguments(LUAJIT_TEST_COMMAND) > > @@ -75,5 +125,6 @@ if(LUAJIT_USE_TEST) >    add_custom_target(test DEPENDS >      ${PROJECT_NAME}-test >      ${PROJECT_NAME}-luacheck > + ${PROJECT_NAME}-checkpatch >    ) >  endif() > -- > 2.34.1 > > -- > Best regards, > Maxim Kokryashkin > --------------0GEw94n6wSISRX0jcgAufcd4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi, Max

On 8/3/23 22:38, Maxim Kokryashkin via Tarantool-patches wrote:
Hi, Sergey!
Please consider my comments below.
 
 
From: Sergey Bronnikov <sergeyb@tarantool.org>

In Tarantool we use our own fork of checkpatch [1] with additional check
types. It's logical to use it in LuaJIT development. However, we don't
need to enable all checks [2] implemented in checkpatch, therefore a
number of checks are disabled.

Patch introduces two new CMake targets: "LuaJIT-checkpatch", that checks
patches on top of the master branch using script checkpatch.pl, and
Typo: s/using/using the/

Fixed.

target "check", that combines LuaJIT-luacheck and LuaJIT-checkpatch. By
default CMake looking for checkpatch.pl in a directory "checkpatch" in
Typo: s/looking/looks/
Typo: s/in a directory/in the directory/
Fixed.
LuaJIT repository root directory and in a directories specified in PATH.
Typo: s/LuaJIT/the LuaJIT/
Typo: s/a directories/directories/

Fixed.


 

1. https://github.com/tarantool/checkpatch
2. https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst
---
 test/CMakeLists.txt | 51 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 47296a22..5ec0bed6 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -42,6 +42,56 @@ else()
   )
 endif()
 
+find_program(CHECKPATCH checkpatch.pl
+ HINTS ${PROJECT_SOURCE_DIR}/checkpatch)
+add_custom_target(${PROJECT_NAME}-checkpatch)
+set(MASTER_BRANCH "tarantool/master")
+if(CHECKPATCH)
+ add_custom_command(TARGET ${PROJECT_NAME}-checkpatch
+ COMMENT "Running checkpatch"
+ COMMAND
+ ${CHECKPATCH}
+ # Description of supported checks in
+ # https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst
+ --codespell
+ --color=always
+ --git ${MASTER_BRANCH}..HEAD
+ --show-types
+ --ignore BAD_SIGN_OFF
+ --ignore BLOCK_COMMENT_STYLE
+ --ignore CODE_INDENT
+ --ignore COMMIT_LOG_LONG_LINE
+ # Requires at least two lines in commit message and this
+ # is annoying.
+ --ignore COMMIT_MESSAGE
+ --ignore CONSTANT_COMPARISON
+ --ignore FUNCTION_NAME_NO_NEWLINE
+ --ignore GIT_COMMIT_ID
+ --ignore INCLUDE_GUARD
+ --ignore LOGICAL_CONTINUATIONS
+ --ignore LONG_LINE
+ --ignore NO_CHANGELOG
+ --ignore NO_DOC
+ --ignore NO_TEST
+ --ignore PREFER_DEFINED_ATTRIBUTE_MACRO
+ --ignore SPACING
+ --ignore SUSPECT_CODE_INDENT
+ --ignore TABSTOP
+ --ignore TRAILING_STATEMENTS
+ --ignore UNCOMMENTED_DEFINITION
+ --ignore UNSAFE_FUNCTION
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ )
+else()
I suggest doing the same as with coverage — move that logic into a separate module,
so the test/CMakeLists.txt remains readable and clean.


Done, force-pushed.


commit 609f893ecc5ee9895916c637c145489fe59d9bb0
Author: Sergey Bronnikov <estetus@gmail.com>
Date:   Fri Aug 4 13:51:23 2023 +0300

    cmake: checkpatch module

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0204e852..b1a442b7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,9 +29,12 @@ endif()
 
 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
+set(GIT_MASTER_BRANCH "tarantool/master")
+
 include(LuaJITUtils)
 include(SetBuildParallelLevel)
 include(SetVersion)
+include(CheckPatch)
 
 # --- Variables to be exported to child scopes ---------------------------------
 
diff --git a/cmake/CheckPatch.cmake b/cmake/CheckPatch.cmake
new file mode 100644
index 00000000..243ee426
--- /dev/null
+++ b/cmake/CheckPatch.cmake
@@ -0,0 +1,46 @@
+find_program(CHECKPATCH checkpatch.pl
+             HINTS ${PROJECT_SOURCE_DIR}/checkpatch)
+add_custom_target(${PROJECT_NAME}-checkpatch)
+if(CHECKPATCH)
+  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch
+    COMMENT "Running checkpatch"
+    COMMAND
+      ${CHECKPATCH}
+        # Description of supported checks in
+        # https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst
+        --codespell
+        --color=always
+        --git ${GIT_MASTER_BRANCH}..HEAD
+        --show-types
+        --ignore BAD_SIGN_OFF
+        --ignore BLOCK_COMMENT_STYLE
+        --ignore CODE_INDENT
+        --ignore COMMIT_LOG_LONG_LINE
+        # Requires at least two lines in commit message and this
+        # is annoying.
+        --ignore COMMIT_MESSAGE
+        --ignore CONSTANT_COMPARISON
+        --ignore FUNCTION_NAME_NO_NEWLINE
+        --ignore GIT_COMMIT_ID
+        --ignore INCLUDE_GUARD
+        --ignore LOGICAL_CONTINUATIONS
+        --ignore LONG_LINE
+        --ignore NO_CHANGELOG
+        --ignore NO_DOC
+        --ignore NO_TEST
+        --ignore PREFER_DEFINED_ATTRIBUTE_MACRO
+        --ignore SPACING
+        --ignore SUSPECT_CODE_INDENT
+        --ignore TABSTOP
+        --ignore TRAILING_STATEMENTS
+        --ignore UNCOMMENTED_DEFINITION
+        --ignore UNSAFE_FUNCTION
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+  )
+else()
+  set(MSG "`checkpatch.pl' is not found, so ${PROJECT_NAME}-checkpatch target is dummy")
+  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch
+    COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG}
+    COMMENT ${MSG}
+  )
+endif()
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5ec0bed6..66f6ee77 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -42,52 +42,6 @@ else()
   )
 endif()
 
-find_program(CHECKPATCH checkpatch.pl
-             HINTS ${PROJECT_SOURCE_DIR}/checkpatch)
-add_custom_target(${PROJECT_NAME}-checkpatch)
-set(MASTER_BRANCH "tarantool/master")
-if(CHECKPATCH)
-  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch
-    COMMENT "Running checkpatch"
-    COMMAND
-      ${CHECKPATCH}
-        # Description of supported checks in
-        # https://github.com/tarantool/checkpatch/blob/master/doc/checkpatch.rst
-        --codespell
-        --color=always
-        --git ${MASTER_BRANCH}..HEAD
-        --show-types
-        --ignore BAD_SIGN_OFF
-        --ignore BLOCK_COMMENT_STYLE
-        --ignore CODE_INDENT
-        --ignore COMMIT_LOG_LONG_LINE
-        # Requires at least two lines in commit message and this
-        # is annoying.
-        --ignore COMMIT_MESSAGE
-        --ignore CONSTANT_COMPARISON
-        --ignore FUNCTION_NAME_NO_NEWLINE
-        --ignore GIT_COMMIT_ID
-        --ignore INCLUDE_GUARD
-        --ignore LOGICAL_CONTINUATIONS
-        --ignore LONG_LINE
-        --ignore NO_CHANGELOG
-        --ignore NO_DOC
-        --ignore NO_TEST
-        --ignore PREFER_DEFINED_ATTRIBUTE_MACRO
-        --ignore SPACING
-        --ignore SUSPECT_CODE_INDENT
-        --ignore TABSTOP
-        --ignore TRAILING_STATEMENTS
-        --ignore UNCOMMENTED_DEFINITION
-        --ignore UNSAFE_FUNCTION
-    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
-  )
-else()
-  add_custom_command(TARGET ${PROJECT_NAME}-checkpatch
-    COMMENT "`checkpatch.pl' is not found, so ${PROJECT_NAME}-checkpatch target is dummy"
-  )
-endif()
-
 add_custom_target(check
   DEPENDS ${PROJECT_NAME}-checkpatch ${PROJECT_NAME}-luacheck
 )


+ add_custom_command(TARGET ${PROJECT_NAME}-checkpatch
+ COMMENT "`checkpatch.pl' is not found, so ${PROJECT_NAME}-checkpatch target is dummy"
+ )
+endif()
+
+add_custom_target(check
+ DEPENDS ${PROJECT_NAME}-checkpatch ${PROJECT_NAME}-luacheck
+)
+
 set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e dofile[[${LUAJIT_TEST_INIT}]]")
 separate_arguments(LUAJIT_TEST_COMMAND)
 
@@ -75,5 +125,6 @@ if(LUAJIT_USE_TEST)
   add_custom_target(test DEPENDS
     ${PROJECT_NAME}-test
     ${PROJECT_NAME}-luacheck
+ ${PROJECT_NAME}-checkpatch
   )
 endif()
--
2.34.1
--
Best regards,
Maxim Kokryashkin
--------------0GEw94n6wSISRX0jcgAufcd4--