From 4e3699d13a13ab07cb344f43c3fdd474ca72535e Mon Sep 17 00:00:00 2001 From: Maverun Date: Tue, 19 Jul 2022 05:03:22 -0400 Subject: fix(docs): remove internal function from docs (nvim__*) --- scripts/gen_vimdoc.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index 22fd155d32..74b35b4e9b 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -897,6 +897,8 @@ def fmt_doxygen_xml_as_vimhelp(filename, target): doc = fmt_node_as_vimhelp(fn['desc_node'], fmt_vimhelp=True) if not doc and fn['brief_desc_node']: doc = fmt_node_as_vimhelp(fn['brief_desc_node']) + if not doc and name.startswith("nvim__"): + continue if not doc: doc = 'TODO: Documentation' -- cgit From f87c8245133dd8116a9bab2d2e89f9b26967c7a8 Mon Sep 17 00:00:00 2001 From: bfredl Date: Sat, 9 Jul 2022 14:48:09 +0200 Subject: fix(rpc): break nvim_error_event feedback loop between two nvim instances In case nvim A sends nvim_error_event to nvim B, it would respond with another nvim_error_event due to unknown request name. Fix this by adding dummy request handler for now. --- scripts/gen_vimdoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py index 22fd155d32..9ab80991b7 100755 --- a/scripts/gen_vimdoc.py +++ b/scripts/gen_vimdoc.py @@ -947,7 +947,8 @@ def fmt_doxygen_xml_as_vimhelp(filename, target): func_doc = "\n".join(split_lines) - if name.startswith(CONFIG[target]['fn_name_prefix']): + if (name.startswith(CONFIG[target]['fn_name_prefix']) + and name != "nvim_error_event"): fns_txt[name] = func_doc return ('\n\n'.join(list(fns_txt.values())), -- cgit From 9d4a4f49ef74f3c14df63e3d32a20830bfa8c7a9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 22 Jul 2022 21:14:17 +0800 Subject: vim-patch:8.1.1933: the eval.c file is too big (#19462) Problem: The eval.c file is too big. Solution: Move code related to variables to evalvars.c. (Yegappan Lakshmanan, closes vim/vim#4868) https://github.com/vim/vim/commit/0522ba0359c96a8c2a4fc8fca0d3b58e49dda759 Name the new file eval/vars.c instead. --- scripts/vim-patch.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index d5424f51ab..f1bc07c249 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -229,6 +229,10 @@ preprocess_patch() { LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalfunc\.c/\1\/eval\/funcs\.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" + # Rename evalvars.c to eval/vars.c + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalfunc\.c/\1\/eval\/vars\.c/g' \ + "$file" > "$file".tmp && mv "$file".tmp "$file" + # Rename userfunc.c to eval/userfunc.c LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/userfunc\.c/\1\/eval\/userfunc\.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" -- cgit From 271739c8305ac7eb41a3467e508bdeb5c03f0427 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 22 Jul 2022 21:44:28 +0800 Subject: refactor: move f_getbufvar() and f_setbufvar() to eval/vars.c Vim moved them there in patch 8.1.1943. --- scripts/vim-patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index f1bc07c249..3825d9f0ea 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -230,7 +230,7 @@ preprocess_patch() { "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename evalvars.c to eval/vars.c - LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalfunc\.c/\1\/eval\/vars\.c/g' \ + LC_ALL=C sed -e 's/\( [ab]\/src\/nvim\)\/evalvars\.c/\1\/eval\/vars\.c/g' \ "$file" > "$file".tmp && mv "$file".tmp "$file" # Rename userfunc.c to eval/userfunc.c -- cgit From 49d2256ae5b747830160a1dd1f3f532cf726b394 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 27 Jul 2022 00:17:11 +0200 Subject: build(gen_vimdoc): fall back to lua if luajit doesn't exist (#19498) It currently falls back to texlua if luajit doesn't exist. However, the documentation generation does not work with texlua. Instead use lua as a fall back instead. --- scripts/lua2dox_filter | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'scripts') diff --git a/scripts/lua2dox_filter b/scripts/lua2dox_filter index 8760f12176..22484a807f 100755 --- a/scripts/lua2dox_filter +++ b/scripts/lua2dox_filter @@ -36,22 +36,14 @@ test_executable(){ ##! \brief sets the lua interpreter set_lua(){ - if test -z "${EXE}" - then + if test -z "${EXE}"; then test_executable 'luajit' fi - if test -z "${EXE}" - then - test_executable 'texlua' - fi - - if test -z "${EXE}" - then + if test -z "${EXE}"; then test_executable 'lua' fi - #echo "final EXE=\"${EXE}\"" - } +} ##! \brief makes canonical name of file ##! -- cgit From 0b8bade493235cda9d8ab3ed138d6c94d7cef759 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 29 Jul 2022 10:32:00 +0800 Subject: build(pvscheck): disable PVS/V1028 (#19553) Most casts where PVS warns for V1028 aren't added to prevent overflows in the first place, but to avoid other warnings, like printf argument or -Wconversion warnings. PVS/V1028 is more annoying than useful. --- scripts/pvscheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/pvscheck.sh b/scripts/pvscheck.sh index a931231fbd..d48fe6f99a 100755 --- a/scripts/pvscheck.sh +++ b/scripts/pvscheck.sh @@ -380,7 +380,7 @@ run_analysis() {( --sourcetree-root . || true rm -rf PVS-studio.{xml,err,tsk,html.d} - local plog_args="PVS-studio.log --srcRoot . --excludedCodes V011,V1042,V1051,V1074,V002" + local plog_args="PVS-studio.log --srcRoot . --excludedCodes V002,V011,V1024,V1042,V1051,V1074" plog-converter $plog_args --renderTypes xml --output PVS-studio.xml plog-converter $plog_args --renderTypes errorfile --output PVS-studio.err plog-converter $plog_args --renderTypes tasklist --output PVS-studio.tsk -- cgit From 02efdb4d587242122df99b347a25fd4c96b0ca97 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 29 Jul 2022 14:44:18 +0800 Subject: refactor: fix clang and PVS warnings (#19569) The last commit didn't actually disable V1028 because of a typo. Fix the typo so it is actually disabled. --- scripts/pvscheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/pvscheck.sh b/scripts/pvscheck.sh index d48fe6f99a..610c20eb48 100755 --- a/scripts/pvscheck.sh +++ b/scripts/pvscheck.sh @@ -380,7 +380,7 @@ run_analysis() {( --sourcetree-root . || true rm -rf PVS-studio.{xml,err,tsk,html.d} - local plog_args="PVS-studio.log --srcRoot . --excludedCodes V002,V011,V1024,V1042,V1051,V1074" + local plog_args="PVS-studio.log --srcRoot . --excludedCodes V002,V011,V1028,V1042,V1051,V1074" plog-converter $plog_args --renderTypes xml --output PVS-studio.xml plog-converter $plog_args --renderTypes errorfile --output PVS-studio.err plog-converter $plog_args --renderTypes tasklist --output PVS-studio.tsk -- cgit From 8ce7e7409f10f0a90ed8aa3f6f179c4b5d44eacb Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 2 Aug 2022 12:32:57 +0200 Subject: build: add formatting targets for c and lua files (#19488) The targets will only format files that have been changed in current branch compared to the master branch. This includes unstaged, staged and committed files. Add following make and cmake targets: formatc - format changed c files formatlua - format changed lua files format - run formatc and formatlua Remove scripts/uncrustify.sh as this deprecates it. --- scripts/uncrustify.sh | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100755 scripts/uncrustify.sh (limited to 'scripts') diff --git a/scripts/uncrustify.sh b/scripts/uncrustify.sh deleted file mode 100755 index ac5d542c29..0000000000 --- a/scripts/uncrustify.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# Check that you have uncrustify -hash uncrustify - -COMMITISH="${1:-master}" -for file in $(git diff --diff-filter=d --name-only $COMMITISH | grep '\.[ch]$'); do - uncrustify -c src/uncrustify.cfg -l C --replace --no-backup "$file" -done -- cgit