Make gdb/guile codespell-clean
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
This cleans up the last codespell reports in the Guile directory and
adds gdb/guile to pre-commit.
It also tells codespell to ignore URLs. I think this is warranted
because many URLs don't really contain words per se; and furthermore
if any URL-checking is needed at all, it would be for liveness and not
spelling.
Also I was wondering why the codespell config is in contrib and not
gdb/setup.cfg.
---
.pre-commit-config.yaml | 2 +-
gdb/contrib/setup.cfg | 3 +++
gdb/guile/scm-value.c | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
Comments
On 4/3/25 20:13, Tom Tromey wrote:
> This cleans up the last codespell reports in the Guile directory and
> adds gdb/guile to pre-commit.
>
> It also tells codespell to ignore URLs. I think this is warranted
> because many URLs don't really contain words per se; and furthermore
> if any URL-checking is needed at all, it would be for liveness and not
> spelling.
>
Hi Tom,
I had a version of this patch queued for submission (btw likewise the
one for the python dir), which added debbugs to the local dictionary,
but I like this better.
So, LGTM.
Approved-By: Tom de Vries <tdevries@suse.de>
> Also I was wondering why the codespell config is in contrib and not
> gdb/setup.cfg.
I added it there to be alongside the codespell local dictionary
(codespell-ignore-words.txt).
But I have no strong opinion about where the codespell config should be.
Thanks,
- Tom
> ---
> .pre-commit-config.yaml | 2 +-
> gdb/contrib/setup.cfg | 3 +++
> gdb/guile/scm-value.c | 2 +-
> 3 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
> index 2a7aaa75198..1fe1c8de0fc 100644
> --- a/.pre-commit-config.yaml
> +++ b/.pre-commit-config.yaml
> @@ -69,7 +69,7 @@ repos:
> rev: v2.4.1
> hooks:
> - id: codespell
> - files: '^(gdbsupport|gdbserver|gdb/(tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile))/'
> + files: '^(gdbsupport|gdbserver|gdb/(tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|guile))/'
> args: [--config, gdb/contrib/setup.cfg]
> - repo: local
> hooks:
> diff --git a/gdb/contrib/setup.cfg b/gdb/contrib/setup.cfg
> index dbff1651f4d..670a85064e2 100644
> --- a/gdb/contrib/setup.cfg
> +++ b/gdb/contrib/setup.cfg
> @@ -4,3 +4,6 @@
> skip = */ChangeLog*,*/configure,gdbsupport/Makefile.in,*.dat,*.eps,gdb/features/*.c,gdb/ada-casefold.h,gdb/copying.c,gdb/gdbarch-gen.h,gdb/gdbarch-gen.c,gdb/target-delegates-gen.c
>
> ignore-words = gdb/contrib/codespell-ignore-words.txt
> +
> +# Ignore all URLs.
> +uri-ignore-words-list = *
> diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c
> index 0f4a6a46da0..88132e0e168 100644
> --- a/gdb/guile/scm-value.c
> +++ b/gdb/guile/scm-value.c
> @@ -604,7 +604,7 @@ gdbscm_value_dynamic_type (SCM self)
> type = value_rtti_type (value, NULL, NULL, NULL);
> else
> {
> - /* Re-use object's static type. */
> + /* Reuse object's static type. */
> type = NULL;
> }
> }
@@ -69,7 +69,7 @@ repos:
rev: v2.4.1
hooks:
- id: codespell
- files: '^(gdbsupport|gdbserver|gdb/(tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile))/'
+ files: '^(gdbsupport|gdbserver|gdb/(tui|target|data-directory|po|system-gdbinit|mi|syscalls|arch|regformats|compile|guile))/'
args: [--config, gdb/contrib/setup.cfg]
- repo: local
hooks:
@@ -4,3 +4,6 @@
skip = */ChangeLog*,*/configure,gdbsupport/Makefile.in,*.dat,*.eps,gdb/features/*.c,gdb/ada-casefold.h,gdb/copying.c,gdb/gdbarch-gen.h,gdb/gdbarch-gen.c,gdb/target-delegates-gen.c
ignore-words = gdb/contrib/codespell-ignore-words.txt
+
+# Ignore all URLs.
+uri-ignore-words-list = *
@@ -604,7 +604,7 @@ gdbscm_value_dynamic_type (SCM self)
type = value_rtti_type (value, NULL, NULL, NULL);
else
{
- /* Re-use object's static type. */
+ /* Reuse object's static type. */
type = NULL;
}
}