diff options
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | src/nvim/version.c | 17 | ||||
-rw-r--r-- | test/unit/helpers.lua | 4 |
4 files changed, 19 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 947de61988..2314384d79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -668,15 +668,6 @@ else() COMMENT "lualint: LUACHECK_PRG not defined") endif() -if(FLAKE8_PRG) - add_custom_target(pylint - COMMAND ${FLAKE8_PRG} contrib/ scripts/ src/ test/ - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -else() - add_custom_target(pylint false - COMMENT "flake8: FLAKE8_PRG not defined") -endif() - set(CPACK_PACKAGE_NAME "Neovim") set(CPACK_PACKAGE_VENDOR "neovim.io") set(CPACK_PACKAGE_VERSION ${NVIM_VERSION_MEDIUM}) @@ -138,8 +138,8 @@ functionaltest-lua: | nvim lualint: | build/.ran-cmake deps $(BUILD_CMD) -C build lualint -pylint: | build/.ran-cmake deps - $(BUILD_CMD) -C build pylint +pylint: + flake8 contrib/ scripts/ src/ test/ unittest: | nvim +$(BUILD_CMD) -C build unittest @@ -182,7 +182,11 @@ appimage: appimage-%: bash scripts/genappimage.sh $* -lint: check-single-includes clint lualint pylint +lint: check-single-includes clint lualint + @# Run pylint only if flake8 is installed. + @command -v flake8 \ + && { $(MAKE) pylint; exit $?; } \ + || echo "SKIP: pylint (flake8 not found)" # Generic pattern rules, allowing for `make build/bin/nvim` etc. # Does not work with "Unix Makefiles". diff --git a/src/nvim/version.c b/src/nvim/version.c index 33b2a05cbb..e07865a410 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2034,14 +2034,19 @@ static void version_msg(char *s) version_msg_wrap((char_u *)s, false); } -/// List all features aligned in columns, dictionary style. +/// List all features. +/// This does not use list_in_columns (as in Vim), because there are only a +/// few, and we do not start at a new line. static void list_features(void) { - list_in_columns((char_u **)features, -1, -1); - if (msg_col > 0) { - msg_putchar('\n'); + version_msg(_("\n\nFeatures: ")); + for (int i = 0; features[i] != NULL; i++) { + version_msg(features[i]); + if (features[i+1] != NULL) { + version_msg(" "); + } } - MSG_PUTS("See \":help feature-compile\"\n\n"); + version_msg("\nSee \":help feature-compile\"\n\n"); } /// List string items nicely aligned in columns. @@ -2150,8 +2155,6 @@ void list_version(void) } #endif // ifdef HAVE_PATHDEF - version_msg(_("\n\nFeatures: ")); - list_features(); #ifdef SYS_VIMRC_FILE diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index b5d3dd9f47..24dbc65bd0 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -456,8 +456,8 @@ else if bytes_written == -1 then local err = ffi.errno(0) if err ~= ffi.C.kPOSIXErrnoEINTR then - assert(false, ("write() error: %u: %s"):format( - err, ffi.string(ffi.C.strerror(err)))) + assert(false, ("write() error: %u: %s ('%s')"):format( + err, ffi.string(ffi.C.strerror(err)), s)) end elseif bytes_written == 0 then break |