Commit Graph

91 Commits

Author SHA1 Message Date
dundargoc
397b92e02d build: enable ASAN for MSVC
It is enabled with ENABLE_ASAN_UBSAN like other compilers. Technically
it only enables ASAN as UBSAN is not available, meaning to make the
variable names fully correct we'd need to separate it into two checks:
ENABLE_ASAN and ENABLE_UBSAN, but the convenience of combining them into
the same flag outweighs the theoretical correctness.

Also note in CONTRIBUTING.md that debug builds in ASAN is not supported.
Technically it is the debug runtime that is not supported, which cmake
automatically enables when using the debug build type. However, neovim
can't be built with debug builds without linking to the debug runtime
since the third party libraries has likely been linked to the debug
runtime if it was built with debug build type. This technicality is
likely uninteresting to the potential developer and it's easier to just
say to use a release build type.
2023-11-05 21:39:12 +01:00
dundargoc
1913041518
docs: Lua docstrings guidance #25345
Recommend adding a space after i.e. `--- @see`.

The "space" variant is common for the vast majority of docstring formats
such as doxygen, javadoc and typescript.
2023-09-27 21:57:22 -07:00
Justin M. Keyes
1b55f51d0d
docs: misc #24561
fix #24699
fix #25253
2023-09-20 04:15:23 -07:00
zeertzjq
5bb17958c5
build: fix "make iwyu" not working (#24873) 2023-08-26 17:20:40 +08:00
Lewis Russell
2234b84a1b docs(generators): bake into cmake 2023-08-23 12:16:04 +01:00
Lewis Russell
c0beb8173f
feat: add .luarc.json (#24592) 2023-08-07 16:27:53 +01:00
Justin M. Keyes
b1fb04475e docs: remove "#" comment char in @return
Everything after a "#" char is a "description" comment, i.e. luals won't
treat it as a type, name, etc. But "#" should not be present in the
generated docs (such as :help docs).
https://github.com/LuaLS/lua-language-server/wiki/Annotations#return
2023-08-03 14:01:53 +02:00
Justin M. Keyes
d2f8133024 docs: misc
Co-authored-by: Kevin Pham <keevan.pham@gmail.com>
2023-08-03 14:01:53 +02:00
Lewis Russell
804108af6c
docs: CONTRIBUTING.md updates (#24280) 2023-07-07 13:52:30 +01:00
Justin M. Keyes
cee981bf09
docs #22363
Co-authored by: zeertzjq <zeertzjq@outlook.com>
Co-authored by: Steven Todd McIntyre II <114119064+stmii@users.noreply.github.com>
Co-authored by: nobe4 <nobe4@users.noreply.github.com>

- docs: mention --luadev-mod to run with lua runtime files
  When changing a lua file in the ./runtime folder, a new contributor
  might expect changes to be applied to the built Neovim binary.
2023-06-19 02:24:44 -07:00
ii14
4cc69f45b4 build: add ubsan default options
Use print_stacktrace=1 for UBSAN by default.
2023-05-15 16:50:58 +02:00
dundargoc
664f2749e6
build: add "ci" configure preset to reduce verbosity
`cmake --preset ci`

is equivalent to

`cmake -B build -G Ninja -D CI_BUILD=ON`

Also remove build presets as they're not very useful without workflow
presets, which are only available in schema versions 6 and above.
2023-04-23 17:12:46 +02:00
ii14
17ce634b8f build!: rename sanitizer options from CLANG_* to ENABLE_* 2023-03-17 03:40:57 +01:00
dundargoc
829d92eca3
revert: "build: enable cmake workflow presets (#21860)"
This reverts commit 00a976129b.

Visual Studio fails the build if the CMakePresets.json version is too
high and the CMakePresets.json integration is enabled.

Closes https://github.com/neovim/neovim/issues/22608.
2023-03-11 19:21:54 +01:00
dundargoc
fc8c77a69f
ci: split ci.yml into a test workflow and a build test workflow (#22302)
Having a workflow that only builds neovim without running all of the
tests is a cheap way to test the build still works without burning too
much CI time.
2023-02-18 10:47:22 +01:00
bfredl
87d0809545 build(ci): let ASAN print tracebacks for more errors (SIGABORT, SIGILL) 2023-02-10 22:14:45 +01:00
dundargoc
e5d8220179
ci: simplify lintcommit output (#22204)
- Suggest reading CONTRIBUTING.md once, not for each commit failure
- Suggest using "fix" type if none of the provided types are appropriate
- Remove "dist" type. It's rarely used and can be replaced by using the
  "build" type
2023-02-10 17:03:01 +01:00
dundargoc
881d4adb59
build: enable ccache by default if available (#22020)
Initial benchmarks show that this gives a nice 50% compile time
reduction for neovim. This shouldn't affect users or CI, but it's a nice
speedup for local development. The C_COMPILER_LAUNCHER target property
is only supported by Makefiles and Ninja generators only, so this won't
give a speedup when using the Xcode and Visual Studio generators even if
ccache is available.
2023-01-28 00:42:13 +01:00
dundargoc
00a976129b
build: enable cmake workflow presets (#21860)
Workflow presets allows combining configure, build, test and packaging
steps and makes it possible to run everything in a single command. So

cmake --preset iwyu
cmake --build --preset iwyu

instead becomes

cmake --workflow --preset iwyu

Workflow presets requires at least cmake version 3.25 to use.
2023-01-19 10:34:45 +01:00
Justin M. Keyes
7c94bcd2d7 feat(lua)!: execute Lua with "nvim -l"
Problem:
Nvim has Lua but the "nvim" CLI can't easily be used to execute Lua
scripts, especially scripts that take arguments or produce output.

Solution:
- support "nvim -l [args...]" for running scripts. closes #15749
- exit without +q
- remove lua2dox_filter
- remove Doxyfile. This wasn't used anyway, because the doxygen config
  is inlined in gen_vimdoc.py (`Doxyfile` variable).
- use "nvim -l" in docs-gen CI job

Examples:

    $ nvim -l scripts/lua2dox.lua --help
    Lua2DoX (0.2 20130128)
    ...

    $ echo "print(vim.inspect(_G.arg))" | nvim -l - --arg1 --arg2
    $ echo 'print(vim.inspect(vim.api.nvim_buf_get_text(1,0,0,-1,-1,{})))' | nvim +"put ='text'" -l -

TODO?
  -e executes Lua code
  -l loads a module
  -i enters REPL _after running the other arguments_.
2023-01-05 17:10:02 +01:00
dundargoc
66360675cf build: allow IWYU to fix includes for all .c files
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.

Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
2022-11-15 10:30:03 +01:00
Justin M. Keyes
ef4c339fb9
feat(docs): update parser, HTML gen #20720
Note: although the tolerance in help_spec.lua increased, the actual
error count with the new parser decreased by about 20%. The difference
is that the old ignore_parse_error() ignored many more errors with the
old parser.

fix https://github.com/neovim/tree-sitter-vimdoc/issues/37
fix https://github.com/neovim/tree-sitter-vimdoc/issues/44
fix https://github.com/neovim/tree-sitter-vimdoc/issues/47
2022-10-18 07:18:44 -07:00
Justin M. Keyes
e5cb3104d0
docs: fix/remove invalid URLs #20647 2022-10-14 08:01:13 -07:00
Justin M. Keyes
09dffb9db7
docs: various #12823
- increase python line-length limit from 88 => 100.
- gen_help_html: fix bug in "tag" case (tbl_count => tbl_contains)

ref #15632
fix #18215
fix #18479
fix #20527
fix #20532

Co-authored-by: Ben Weedon <ben@weedon.email>
2022-10-09 05:21:52 -07:00
dundargoc
2d6735d8ce
ci: move BSD jobs from sourcehut to Cirrus CI #19616
dispatch.sr.ht is being deprecated, meaning that using sourcehut CI
won't be possible (see https://github.com/neovim/neovim/issues/19609).
Since Github Actions doesn't provide any BSD runners an external service
is required and Cirrus CI seems like a good replacement for sourcehut.

Initially experimented with using FreeBSD and OpenBSD virtual machines
in GitHub Actions, but Cirrus has been a much better fit with better
performance, logs and overall experience.

Failing tests are automatically skipped on FreeBSD regardless if it's on
CI or not. Ideally these tests should only be skipped in CI with the
help of `isCI` helper function. Unfortunately, the tests don't recognize
the environment variable CIRRUS_CI even if it's set manually. This
workaround is good enough for the time being, but we might want to only
skip tests when using the CI (or even better, fix the failing tests).

Closes: https://github.com/neovim/neovim/issues/19609
2022-09-08 15:12:42 -07:00
UnkwUsr
a220650fd6
docs(contributing): fix broken link (#20044) 2022-09-05 08:44:52 +02:00
Christian Clason
5c9baa6f35
docs(contributing): add documenting guidelines from wiki (#19924)
Co-authored-by: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
2022-08-25 09:06:37 +02:00
Lewis Russell
0c0a426e40
doc(CONTRIBUTING): update #19891
- add section for managing includes via IWYU
- recommend clangd over ctags
- tidy up links
- remove ./scripts/check-includes.py
2022-08-23 06:18:05 -07:00
dundargoc
8ce7e7409f
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.
2022-08-02 12:32:57 +02:00
dundargoc
b239db3cb5
feat(lintcommit): remove "chore", add "dist" #18594
"chore" is never necessary, choose "fix" or "feat" if nothing else applies.
2022-05-17 05:42:48 -07:00
dundargoc
e63e5d1dbd
docs: typo fixes (#17859)
Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com>
Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com>
Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: rwxd <rwxd@pm.me>
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
2022-04-15 12:35:06 +02:00
Dundar Göc
4388793799 docs: deprioritize vim-patch as a good beginner task
Also add a disclaimer where familiarity with vim is strongly suggested.
2022-01-16 22:10:22 +01:00
Dundar Göc
482df82e69 docs: stop suggestion "good first issue" as a good first issue
They're simply too difficult and too niche for an actual newcomer to
solve them. Instead, use the "complexity:low" as a substitute.
2021-12-19 22:15:42 +01:00
zeertzjq
0f82deb2c5
docs(CONTRIBUTING.md): use gh instead of hub; correct uncrustify link 2021-12-02 08:28:05 +08:00
Gregory Anders
73b35ef10f
chore: add default luarc.json for Lua development (#16487)
The Sumneko Lua language server has matured quite a bit and many
Neovim developers use it while working on Neovim. Having a default
configuration for Neovim development is a nice convenience (and
dovetails well with the auto-generated compile_command.json for C
development).

The file is shipped under `contrib` and users can make use of it by
symlinking to `.luarc.json` in the project root.
2021-12-01 12:09:50 -07:00
Christian Clason
3b531d50a8
docs(contrib): recommend nvim --clean #15917 2021-10-05 08:01:09 -07:00
kylo252
09307e64df
fix(docs): uncrustify.cfg location #15817 2021-10-02 14:32:18 -07:00
Dundar Göc
38b0306591 docs: update preferred commit message style for the static analyzer PRs 2021-10-01 21:22:32 +02:00
Dundar Göc
b3b02eb529 docs(CONTRIBUTING.md): how to use uncrustify #15780
close #15780
2021-09-25 18:38:51 -07:00
Justin M. Keyes
9f3679cbfd docs: naming conventions 2021-09-09 06:28:11 -07:00
Justin M. Keyes
81f4de08bd
docs: .git-blame-ignore-revs #15510 2021-08-28 14:00:54 -07:00
Justin M. Keyes
8331cd13c4
docs #15447
- update ":help 'hidden'" #15410
- update ":help K" #15398
- try to capture some of the debug steps from #12036 (bpftrace, USDT probes)
2021-08-21 18:26:33 -07:00
dundargoc
35c6aef1c9
docs: update pull request workflow #15243
The WIP, RFC and RDY stage workflow is outdated and unnecessary. The new
workflow utilize the draft pull request on GitHub.
2021-08-17 05:58:49 -07:00
dundargoc
cad5f01cf3
docs: elaborate on commitlint rules (#15322)
linter requires lowercase at start and no period at end of description
2021-08-09 18:46:33 +02:00
dundargoc
141f0038db
docs: fixed link to label "good-first-issue" (#15239) 2021-08-02 11:01:28 +02:00
Dundar Göc
f54340d488 docs: add description of each type 2021-08-01 14:29:29 +02:00
dundargoc
4547137aaf
chore: use codespell to spell check #15016 2021-07-07 15:28:44 -07:00
Björn Linse
3438959da9
Update CONTRIBUTING.md: mention ASAN/UBSAN for runtime errors 2021-06-30 14:57:52 +02:00
Michael Lingelbach
1df8a34a7b
docs(contributing): update commit message instructions (#14758)
we are changing the way we write commits to increase automation. This commit explains how to write commit messages.
2021-06-10 19:08:58 +02:00
Matthieu Coudron
12cd9e4c08 doc: link wiki on how to improve/build doc
We generate some part of the doc from lua which complexifies the process a bit so we've added a wiki page explaining this.
2021-01-27 21:15:52 +01:00