From 2e01b0038daf657ab002218c36157fdc5dfe1df8 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Tue, 27 Dec 2022 17:56:19 +0100 Subject: [PATCH] CONTRIBUTING: Some more Actually mention which formatters we use so people can install them. --- CONTRIBUTING.rst | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 91acee702..68ddae72c 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -43,12 +43,6 @@ Don't introduce new dependencies unless absolutely necessary, and if you do, please make it optional with graceful failure if possible. Add any new dependencies to the README.rst under the *Running* and/or *Building* sections. -This also goes for completion scripts and functions - if at all possible, they should only use -POSIX-compatible invocations of any tools, and no superfluous dependencies. - -E.g. some completions deal with JSON data. In those it's preferable to use python to handle it, -as opposed to ``jq``, because fish already optionally uses python elsewhere. (It also happens to be quite a bit *faster*) - Linters ------- @@ -96,8 +90,11 @@ To ensure your changes conform to the style rules run build_tools/style.fish -before committing your change. That will run ``git-clang-format`` to -rewrite only the lines you’re modifying. +before committing your change. That will run our autoformatters: + +- ``git-clang-format`` for c++ +- ``fish_indent`` (shipped with fish) for fish script +- ``black`` for python If you’ve already committed your changes that’s okay since it will then check the files in the most recent commit. This can be useful after @@ -151,18 +148,6 @@ made to run fish_indent via e.g. (add-hook 'fish-mode-hook (lambda () (add-hook 'before-save-hook 'fish_indent-before-save))) -Suppressing Reformatting of C++ Code -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can tell ``clang-format`` to not reformat a block by enclosing it in -comments like this: - -:: - - // clang-format off - code to ignore - // clang-format on - Fish Script Style Guide -----------------------