docs: Add lint_clean_files instructions
parent
9ca6841e20
commit
8bc83b2d48
|
|
@ -39,7 +39,7 @@ Code Style
|
||||||
|
|
||||||
|
|
||||||
* When adding new files, be sure to add them into `clean_files.txt`, which is a growing list of linted files in the project.
|
* When adding new files, be sure to add them into `clean_files.txt`, which is a growing list of linted files in the project.
|
||||||
* When changing existing files, consider also adding them into `clean_files.txt` and fixing the linting errors that arise.
|
* When changing existing files, consider also adding them into `clean_files.txt` and fixing the linting errors that arise. See :ref:`linting_your_changes` for more information.
|
||||||
* Indentation is using tabs, not spaces. Most of the code is indented with 2 spaces, some with 4 spaced tabs. Please try to stick to tabs.
|
* Indentation is using tabs, not spaces. Most of the code is indented with 2 spaces, some with 4 spaced tabs. Please try to stick to tabs.
|
||||||
If you're using an editor that supports `EditorConfig <http://EditorConfig.org>`_\ , the editor should automatically use the settings defined in Bash-it's `.editorconfig file <.editorconfig>`_.
|
If you're using an editor that supports `EditorConfig <http://EditorConfig.org>`_\ , the editor should automatically use the settings defined in Bash-it's `.editorconfig file <.editorconfig>`_.
|
||||||
* When creating new functions, please use a dash ("-") to separate the words of the function's name, e.g. ``my-new-function``.
|
* When creating new functions, please use a dash ("-") to separate the words of the function's name, e.g. ``my-new-function``.
|
||||||
|
|
|
||||||
|
|
@ -92,3 +92,21 @@ This file configures the behavior of the a pre-commit hook based on `the Pre-Com
|
||||||
installing it (with pip, brew or other tools) then run ``pre-commit install`` in the repo's root to activate the hook.
|
installing it (with pip, brew or other tools) then run ``pre-commit install`` in the repo's root to activate the hook.
|
||||||
For the full use of the tool, you may need to install also other third-party tools, such as
|
For the full use of the tool, you may need to install also other third-party tools, such as
|
||||||
`shellcheck <https://github.com/koalaman/shellcheck/>`_ and `shfmt <https://github.com/mvdan/sh>`_.
|
`shellcheck <https://github.com/koalaman/shellcheck/>`_ and `shfmt <https://github.com/mvdan/sh>`_.
|
||||||
|
|
||||||
|
|
||||||
|
.. _linting_your_changes:
|
||||||
|
|
||||||
|
Linting Your Changes
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
In order to properly lint your changes, you should use our linting script,
|
||||||
|
by simply running ``./lint_clean_files.sh``. This script iterates over all marked-as-clean
|
||||||
|
files, and runs the pre-commit hook on them.
|
||||||
|
|
||||||
|
Please note that most of the files in the project are currently not linted,
|
||||||
|
as we want to make the linting process easier.
|
||||||
|
In order to add your changed/added files to the linting process,
|
||||||
|
please add your files to ``clean_files.txt``. This way ``lint_clean_files.sh``
|
||||||
|
will know to pick them up and lint them.
|
||||||
|
|
||||||
|
Thank you for helping clean up Bash-it, and making it a nicer and better project |:heart:|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue