This was more trouble than it is worth:
- remove_directory fails if doc/ is not owned by the user
- some devs build in-tree, then deleting doc/ breaks the build
- `make install` isn't affected by the stale files at all: the tags are
built before install-time
So, reverting this change means only that devs who use a build/
directory will need to delete build/runtime/doc/ on the occasion that we
rename a doc file.
If a help file is renamed, stale help files in the build workspace will
cause duplicate tags (which causes the build to fail). To avoid this,
always delete build/runtime/doc/ before building helptags.
Tighten our jargon, avoid mentioning "msgpack" everywhere we mention the
RPC API. Prefer "RPC API" when speaking about the remote API.
Though it's conceivable that we may one day support some protocol other
than msgpack, that isn't relevant to most of our discussion of the API,
including this document.
The file name msgpack_rpc.txt is preserved to avoid totally breaking
URLs.
Problem: Can only get the directory of the current window.
Solution: Add window and tab arguments to getcwd() and haslocaldir().
(Thinca, Hirohito Higashi)
c970330676
menu_spec.lua yanks to the clipboard, but never pastes from it. This
can leave a child xsel process waiting around for something to paste the
content, causing the test process to hang.
Since the test isn't explicitly trying to exercise the clipboard, simply
use the default register.
https://neovim.io/develop/style-guide.xml#Horizontal_Whitespace
Note that this errors out for e.g.
if (has_mbyte) mb_copy_char((const char_u **)(&f), &t); \
(found in macros.h:151) or
#define ECMD_SET_HELP 0x02 /* set b_help flag of (new) buffer before
(found in ex_cmds.h:11) (note `(new) buffer`). I left this as-is because these
pieces of code are already caught by another rule (braces near if and `/*`-style
comments). Other false positives I found were:
1. `FUNC_ATTR_NONNULL_ARG(1) FUNC_ATTR_WARN_UNUSED_RESULT`: rejected by
requiring type name to start with `[a-zA-Z_]` (this makes `1` not be
incorrectly recognized as a type).
2. `#define FOO(var) (var)`: rejected by creating `cast_line`.
3. `(expr) * (expr)`: rejected by constructing regexp so that unary operators
require no spaces after them.
4. `int f(void) FUNC_ATTR_PURE`: rejected by requiring line to start with
a space.
5. `"." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE`: not rejected, such
thing should be rare and it would be easy to get rid of the false positive by
e.g. breaking line.
Struct literals like `(MyStruct) { 4, 2 }` are not checked:
1. I am not sure whether they are under this rule at all (this is not a cast).
2. It would be hard to get rid of false positives (like the example with `if`
above, but now for *valid* `if() {}`s).
When skipping these test blocks they may error out:
Error → test/functional/shell/viml_system_spec.lua @ 154
system() with output containing NULs setup
./test/functional/helpers.lua:75: attempt to index upvalue 'session' (a nil value)
stack traceback:
./test/functional/helpers.lua:75: in function 'request'
./test/functional/helpers.lua:166: in function 'nvim_feed'
./test/functional/helpers.lua:195: in function 'feed'
test/functional/shell/viml_system_spec.lua:14: in function <test/functional/shell/viml_system_spec.lua:13>
Error → test/functional/shell/viml_system_spec.lua @ 155
system() with output containing NULs teardown
./test/functional/helpers.lua:75: attempt to index upvalue 'session' (a nil value)
stack traceback:
./test/functional/helpers.lua:75: in function 'eval'
test/functional/shell/viml_system_spec.lua:21: in function <test/functional/shell/viml_system_spec.lua:20>
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.