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 195EA67395C; Mon, 23 Oct 2023 12:25:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 195EA67395C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1698053129; bh=M5U2KeRmVCLoIRavBdaLTo+1jy9ZaFiWt7foNYdPiHY=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=qWj+lell6KEPpu8eCHBUO+VycHQbzdqLx25o0Xz8xQXYFFfOKIg21l2kjyIhdA1ha y0r+9kaYnIB1DvLdaPoEyxr6CGwk/SfmjHg0p3EkgS8v3kmV1PunPQ8w+kdpWXdHJ4 BJDHHz5GyfX2gX8AOMVrJ6+zOTicLxy3LZzWH5wI= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 366FF56281C for ; Mon, 23 Oct 2023 12:25:28 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 366FF56281C Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1qurBf-0007Fg-DI; Mon, 23 Oct 2023 12:25:27 +0300 Date: Mon, 23 Oct 2023 12:20:58 +0300 To: Sergey Bronnikov Message-ID: References: <0f1c6ed9f0bdade86631edc135839e607f3bb7f6.1697042800.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0f1c6ed9f0bdade86631edc135839e607f3bb7f6.1697042800.git.sergeyb@tarantool.org> X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9C197A170B57C5E4370514941B6BB011526E684E030351E9500894C459B0CD1B9E4FCED49C4152D609668D78013C0BD4B08F89D8EC0FEE90FBE19F134F8138CEA X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE761966F250AC1AE21EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006372A285F85D463FE138638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D837CF04AA29BB1BC9EC359AE88EA40A50117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCAE9A1BBD95851C5BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18E5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269176DF2183F8FC7C0406C186E56A1B26068655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CB23BE56FCC6FEFED43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5DC518265F524332D6312C4CA0301EFE200DD6291E53777D9F87CCE6106E1FC07E67D4AC08A07B9B0AD0E433DBF1FBFA3CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFFB836E306B2B005D58ED706DCD69D42B66B8B27878F140965A6FE2871659A2DBCFC48FC8A09AC855A8B50B9382ADB12A369D006AAAEBE6DF83F362E36BFEDFE8A74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojqlVu258LHAEU7DROT7ajCQ== X-DA7885C5: F5D9327CF87C9BF6846294BAF8ED2FDA7619D4E0D06BC2B2AE074E8BF6D0A7EF262E2D401490A4A0DB037EFA58388B346E8BC1A9835FDE71 X-Mailru-Sender: 689FA8AB762F73930F533AC2B33E986B2B71F201327FB966ADDFAA85AB0D4F930FBE9A32752B8C9C2AA642CC12EC09F1FB559BB5D741EB962F61BD320559CF1EFD657A8799238ED55FEEDEB644C299C0ED14614B50AE0675 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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: max.kokryashkin@gmail.com, tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the patch! Please, consider my comments below. On 11.10.23, Sergey Bronnikov wrote: > From: Sergey Bronnikov > > The patch introduces a new CMake target: "LuaJIT-codespell", that > spellchecks files specified in a whitelist by codespell [1]. > > 1. https://github.com/codespell-project/codespell > --- > CMakeLists.txt | 1 + > cmake/CodeSpell.cmake | 36 ++++++++++++++++++++++++++++++++ > test/CMakeLists.txt | 1 + > tools/codespell-ignore-words.txt | 3 +++ > 4 files changed, 41 insertions(+) > create mode 100644 cmake/CodeSpell.cmake > create mode 100644 tools/codespell-ignore-words.txt > > diff --git a/CMakeLists.txt b/CMakeLists.txt > 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) Also, the following files should be checked: * src/lib_misc.c * src/lj_memprof.c * src/lj_memprof.h * src/lj_sysprof.h * src/lj_utils.h * src/lj_wbuf.h * src/lmisclib.h * test/LuaJIT-tests/CMakeLists.txt * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt * test/PUC-Rio-Lua-5.1-tests/CMakeLists.txt * test/PUC-Rio-Lua-5.1-tests/libs/CMakeLists.txt * test/lua-Harness-tests/CMakeLists.txt > + > +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") The output is splitted (thanks CMake). I found the only way to join lines via `string(CONCAT WARN_MSG )`. > + add_custom_command(TARGET ${PROJECT_NAME}-codespell > + COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --red ${MSG} > + COMMENT ${MSG} The ${MSG} is undefined, so this line does nothing and can be deleted. > + ) > +endif (CODESPELL) > 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 Should it be mmapped instead (like map -> mapped)? > +isnt > +FPR > -- > 2.34.1 > -- Best regards, Sergey Kaplun