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 BBDEA5B75C7; Thu, 12 Oct 2023 21:46:09 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org BBDEA5B75C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1697136369; bh=QiRwzDo5f6paSCXYrLC2TcfeypNLTCGcf9q5IWZ2g8o=; 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=J828uhLa+4LOD3joAFtu/OGNETkXXXnfE8BofiMG+443lu4Pr7HjiRGJb1Okz05dg gEiemePfBpp6mmdGpK2slcC21b3cGR+74nP+aj23A04gsfAhnEIw6p/CFpQISUSaV2 dGWEibM4p/8LIO/SUJaQaXC4P6zZw+u0OzATECbY= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [95.163.41.73]) (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 A0A965B75C7 for ; Thu, 12 Oct 2023 21:46:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A0A965B75C7 Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1qr0hC-00F3ID-2u; Thu, 12 Oct 2023 21:46:07 +0300 Date: Thu, 12 Oct 2023 21:46:06 +0300 To: Sergey Bronnikov Cc: Sergey Bronnikov , max.kokryashkin@gmail.com, tarantool-patches@dev.tarantool.org Message-ID: References: <0f1c6ed9f0bdade86631edc135839e607f3bb7f6.1697042800.git.sergeyb@tarantool.org> <1697107429.603761776@f747.i.mail.ru> <28a21ed3-a914-4270-872a-3706e7a977c2@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <28a21ed3-a914-4270-872a-3706e7a977c2@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: EEAE043A70213CC8 X-77F55803: 4F1203BC0FB41BD9E53947C414B09A92C46C53C5B1B40BC0409D73ABE4C75F5F182A05F5380850404C228DA9ACA6FE2757C5A693864A1784DA82DC96EAD8F86E398304BBA8710F0384CE55C2CD430ACE X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79488F21A45FBCE3EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637E7FC1205106FBD248638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D802A3072A0B967275888B5C92C8AC3D98117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAE9A1BBD95851C5BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18E5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EE0AC5B80A05675ACD32F3B5D5B27460C0D8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE3093C2F12201C912A302FCEF25BFAB345C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C7AE820D2C17D0E562E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89F83C798A30B85E16B5E1C53F199C2BB95B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A51850ABF10246386AC92A3AD6D2F5A009BD0CCCD71D6E927DF87CCE6106E1FC07E67D4AC08A07B9B0B6FBD635917D924DCB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFF1F3974A566425FAD92450D4461A123A7CD393F87BC3E626EF3D7DFE2B44693560849098BFF6585A27E9EA44DF0471FDDB2826261412FD6E263497216D6B7735A74DFFEFA5DC0E7F02C26D483E81D6BE64ACE4A408B72B61B0CA6F94E606A667A52EF62A646584F811BD90D3D42C882D43082AE146A756F3 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojBYtV3BjG6I46R3LgKXaT3Q== X-Mailru-Sender: 7940E2A4EB16C997A697C250BADECD3D3742DF6E974D9BC7C7F28207DA2F4EB7E2527C969975515CFF9FCECFB8D89CB6C77752E0C033A69E235A20A81F3B0E39AB3C5F247CB2F7F93A5DB60FBEB33A8A0DA7A0AF5A3A8387 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Sergey, On Thu, Oct 12, 2023 at 04:28:36PM +0300, Sergey Bronnikov wrote: > Hi, Max > > > thanks for review! see my comments > > > > diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake > > new file mode 100644 > > index 00000000..c4d3555d > > --- /dev/null > > +++ b/cmake/CodeSpell.cmake > > @@ -0,0 +1,36 @@ > > +find_program(CODESPELL codespell) > > + > > +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_mapi.c) > > +list(APPEND CODESPELL_WHITELIST > > ${PROJECT_SOURCE_DIR}/src/lj_sysprof.c) > > +list(APPEND CODESPELL_WHITELIST > > ${PROJECT_SOURCE_DIR}/src/lj_utils_leb128.c) > > +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/src/lj_wbuf.c) > > +list(APPEND CODESPELL_WHITELIST > > ${PROJECT_SOURCE_DIR}/src/luajit-gdb.py) > > +list(APPEND CODESPELL_WHITELIST > > ${PROJECT_SOURCE_DIR}/src/luajit_lldb.py) > > +list(APPEND CODESPELL_WHITELIST > > ${PROJECT_SOURCE_DIR}/test/CMakeLists.txt) > > +list(APPEND CODESPELL_WHITELIST > > ${PROJECT_SOURCE_DIR}/test/tarantool-c-tests) > > +list(APPEND CODESPELL_WHITELIST > > ${PROJECT_SOURCE_DIR}/test/tarantool-tests) > > +list(APPEND CODESPELL_WHITELIST ${PROJECT_SOURCE_DIR}/tools) > > > > CMake’s list is variadic, you can add all entries in one go. > > Sure, I know. This way it looks better and changes in patches will be more > readable. I don't get how it is more readable. For me it's quite the opposite -- there is too much repetitions of the same pattern `list(APPEND CODESPELL_WHITELIST ...), which makes the latter part with paths less readable. > > > > + > > +set(IGNORE_WORDS > > ${PROJECT_SOURCE_DIR}/tools/codespell-ignore-words.txt) > > + > > +add_custom_target(${PROJECT_NAME}-codespell) > > +if (CODESPELL) > > + add_custom_command(TARGET ${PROJECT_NAME}-codespell > > + COMMENT "Running codespell" > > + COMMAND > > + ${CODESPELL} > > + --ignore-words ${IGNORE_WORDS} > > + --skip ${IGNORE_WORDS} > > + --ignore-words-list fpr > > + --check-filenames > > + ${CODESPELL_WHITELIST} > > + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} > > + ) > > +else () > > + set(WARN_MSG "`codespell' is not found, " > > + "so ${PROJECT_NAME}-codespell target is dummy") > > + add_custom_command(TARGET ${PROJECT_NAME}-codespell > > + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG} > > + COMMENT ${MSG} > > > > Why a `message` call with level set to WARNING is not enough? > > it is a CMake target, you cannot use `message` command there. You can just leave the target empty then. `message` can be called from anywhere. > > > > Is there a concern > > about coloring? > > for me warning highlighted by red color will be more notable than without > it. > > > > If so, I believe it’s inconsistent to use approach with cmake_echo_color. > > In case of `prove` absence on the machine, the more important message > > about > > skipped regression tests will be less noticeable in comparison with > > codespell, which is > > by far less important. > > > + ) > > +endif (CODESPELL) > > diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt > > index 58cba5ba..8afc42df 100644 > > --- a/test/CMakeLists.txt > > +++ b/test/CMakeLists.txt > > @@ -68,6 +68,7 @@ endif() > >  add_custom_target(${PROJECT_NAME}-lint DEPENDS > >    ${PROJECT_NAME}-luacheck > >    ${PROJECT_NAME}-flake8 > > + ${PROJECT_NAME}-codespell > >  ) > > > >  set(LUAJIT_TEST_COMMAND "${LUAJIT_TEST_BINARY} -e > > dofile[[${LUAJIT_TEST_INIT}]]") > > diff --git a/tools/codespell-ignore-words.txt > > b/tools/codespell-ignore-words.txt > > new file mode 100644 > > index 00000000..ceeed47c > > --- /dev/null > > +++ b/tools/codespell-ignore-words.txt > > @@ -0,0 +1,3 @@ > > +mmaped > > +isnt > > +FPR > > -- > > 2.34.1 > > > > -- > > Best regards, > > Maxim Kokryashkin