Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <estetus@gmail.com>,
	tarantool-patches@dev.tarantool.org,
	Sergey Kaplun <skaplun@tarantool.org>,
	max.kokryashkin@gmail.com
Subject: Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell
Date: Wed, 11 Oct 2023 22:33:35 +0300	[thread overview]
Message-ID: <a8490d31-eedc-4035-9c07-e68f40079bf2@tarantool.org> (raw)
In-Reply-To: <0f1c6ed9f0bdade86631edc135839e607f3bb7f6.1697042800.git.sergeyb@tarantool.org>

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 <sergeyb@tarantool.org>
>
> 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

  reply	other threads:[~2023-10-11 19:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 16:52 [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and enable codespell Sergey Bronnikov via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 1/4][v2] codehealth: fix typos Sergey Bronnikov via Tarantool-patches
2023-10-12 10:33   ` Maxim Kokryashkin via Tarantool-patches
2023-10-23  8:50   ` Sergey Kaplun via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 2/4][v2] test: fix codestyle Sergey Bronnikov via Tarantool-patches
2023-10-12 10:34   ` Maxim Kokryashkin via Tarantool-patches
2023-10-23  8:52   ` Sergey Kaplun via Tarantool-patches
2023-10-23 14:13     ` Sergey Bronnikov via Tarantool-patches
2023-10-23 14:27       ` Sergey Kaplun via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell Sergey Bronnikov via Tarantool-patches
2023-10-11 19:33   ` Sergey Bronnikov via Tarantool-patches [this message]
2023-10-12 10:43   ` Maxim Kokryashkin via Tarantool-patches
2023-10-12 13:28     ` Sergey Bronnikov via Tarantool-patches
2023-10-12 18:46       ` Maxim Kokryashkin via Tarantool-patches
2023-10-17 14:50         ` Sergey Bronnikov via Tarantool-patches
2023-10-23  9:20   ` Sergey Kaplun via Tarantool-patches
2023-10-23 12:29     ` Sergey Bronnikov via Tarantool-patches
2023-10-23 14:38       ` Sergey Kaplun via Tarantool-patches
2023-10-31  6:42         ` Sergey Kaplun via Tarantool-patches
2023-10-31 10:50           ` Sergey Bronnikov via Tarantool-patches
2023-10-31 11:31             ` Sergey Kaplun via Tarantool-patches
2023-10-31 11:53             ` Maxim Kokryashkin via Tarantool-patches
2023-10-11 16:52 ` [Tarantool-patches] [PATCH luajit 4/4][v2] ci: enable codespell Sergey Bronnikov via Tarantool-patches
2023-10-12 10:45   ` Maxim Kokryashkin via Tarantool-patches
2023-10-23  8:53   ` Sergey Kaplun via Tarantool-patches
2023-11-16 16:19 ` [Tarantool-patches] [PATCH luajit 0/4][v2] Fix typos and " Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8490d31-eedc-4035-9c07-e68f40079bf2@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=estetus@gmail.com \
    --cc=max.kokryashkin@gmail.com \
    --cc=sergeyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 3/4][v2] cmake: introduce target with codespell' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox