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 82B8D6C7E0D; Wed, 11 Oct 2023 22:33:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 82B8D6C7E0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1697052819; bh=/xQ5oVGpfz+ZR4IHzXV10Hum6V/Eg7jZxop3W8e8N+c=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vQZe3IXOsyoOYYt0hfWF/jqS4dZAxrGwj2KKHnVljomgCmX9okVQ3pbqEHb1ma0tJ Mt9dKVL6ktRW6yYFuPCC16gzvm0YhLuZRRD8u2nVS5/pVIas4iLTFtDZGemWGcC7sZ SGiFoveuo7tJZJpJPhvF24uvI/+xzhuycpU2CC6o= Received: from smtp54.i.mail.ru (smtp54.i.mail.ru [95.163.41.89]) (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 EA7926A816E for ; Wed, 11 Oct 2023 22:33:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org EA7926A816E Received: by smtp54.i.mail.ru with esmtpa (envelope-from ) id 1qqexc-009DLu-0k; Wed, 11 Oct 2023 22:33:36 +0300 Message-ID: Date: Wed, 11 Oct 2023 22:33:35 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Sergey Bronnikov , tarantool-patches@dev.tarantool.org, Sergey Kaplun , max.kokryashkin@gmail.com References: <0f1c6ed9f0bdade86631edc135839e607f3bb7f6.1697042800.git.sergeyb@tarantool.org> Content-Language: en-US In-Reply-To: <0f1c6ed9f0bdade86631edc135839e607f3bb7f6.1697042800.git.sergeyb@tarantool.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9FE0487E5024681463971A198FEAFF48D04BC93A1B985244400894C459B0CD1B9ECBFB7CB471BB8955D0143969A7626E3B352071B5EF9FCC16934EFD898326DC2 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7F2EC3597058CFA6DEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637EE76DA0D7A2874C78638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8706FB9A2DD861C35A1489ED3AA7C816D117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF80095D1E57F4578A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FC26CFBAC0749D213D2E47CDBA5A96583BA9C0B312567BB2376E601842F6C81A19E625A9149C048EEB28585415E75ADA968E75A379BAF682BD8FC6C240DEA76429C9F4D5AE37F343AA9539A8B242431040A6AB1C7CE11FEE389DDFE3E282F3DD103F1AB874ED89028C4224003CC836476E2F48590F00D11D6E2021AF6380DFAD1A18204E546F3947C6FF1B927F95F33162E808ACE2090B5E1725E5C173C3A84C3C5EA940A35A165FF2DBA43225CD8A89FC0F9454058DFE53CA91E23F1B6B78B78B5C8C57E37DE458BEDA766A37F9254B7 X-C1DE0DAB: 0D63561A33F958A5255905CC665C16B01CE045345C9DA942DD173280ABC2680BF87CCE6106E1FC07E67D4AC08A07B9B0F254576263B31EA9CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFCBD39DEF3B09746F49DC7F8A158A77F7C7E84DB3E5215041912CE50BB4AC30D5007A74C46802367AED8146B44B593589C502C9946C6C9BA165055D9FE4CDC253A74DFFEFA5DC0E7F02C26D483E81D6BE0DBAE6F56676BC7117BB6831D7356A2DEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojPxfa+LcGtjhuLIsRAJMIgw== X-Mailru-Sender: C4F68CFF4024C8867DFDF7C7F25884588492361D5346752F1A84F0CB3B2C226781C10C7D7E98660B282EC151BADDC1D3523A6D01B4765B2DFB59E2DDD9FE06B14FA522850F29BC30B0DAF586E7D11B3E67EA787935ED9F1B 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Added fixup patch (and force-pushed): diff --git a/cmake/CodeSpell.cmake b/cmake/CodeSpell.cmake index c4d3555d..475b9d4b 100644 --- a/cmake/CodeSpell.cmake +++ b/cmake/CodeSpell.cmake @@ -21,7 +21,6 @@ if (CODESPELL)        ${CODESPELL}          --ignore-words ${IGNORE_WORDS}          --skip ${IGNORE_WORDS} -        --ignore-words-list fpr          --check-filenames          ${CODESPELL_WHITELIST}      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} diff --git a/tools/codespell-ignore-words.txt b/tools/codespell-ignore-words.txt index ceeed47c..e1865caf 100644 --- a/tools/codespell-ignore-words.txt +++ b/tools/codespell-ignore-words.txt @@ -1,3 +1,3 @@  mmaped  isnt -FPR +fpr On 10/11/23 19:52, 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 > index eebf3d6f..7ef10f2f 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -32,6 +32,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") > include(LuaJITUtils) > include(SetBuildParallelLevel) > include(SetVersion) > +include(CodeSpell) > > # --- Variables to be exported to child scopes --------------------------------- > > 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) > + > +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} > + ) > +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