Changeset View
Changeset View
Standalone View
Standalone View
CONTRIBUTING.md
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
During submission of patches, arcanist will automatically run `arc lint` to | During submission of patches, arcanist will automatically run `arc lint` to | ||||
enforce Bitcoin ABC code formatting standards, and often suggests changes. | enforce Bitcoin ABC code formatting standards, and often suggests changes. | ||||
If code formatting tools do not install automatically on your system, you | If code formatting tools do not install automatically on your system, you | ||||
will have to install the following: | will have to install the following: | ||||
On Ubuntu 20.04: | On Ubuntu 20.04: | ||||
``` | ``` | ||||
sudo apt-get install clang-format clang-tidy clang-tools cppcheck python3-autopep8 flake8 php-codesniffer yamllint | sudo apt-get install clang-format clang-tidy clang-tools cppcheck python3-isort python3-autopep8 flake8 php-codesniffer yamllint | ||||
``` | ``` | ||||
If not available in the distribution, `clang-format-10` and `clang-tidy` can be | If not available in the distribution, `clang-format-10` and `clang-tidy` can be | ||||
installed from <https://releases.llvm.org/download.html> or <https://apt.llvm.org>. | installed from <https://releases.llvm.org/download.html> or <https://apt.llvm.org>. | ||||
On Debian (>= 10), the clang-10 family of tools is available from the https://apt.llvm.org/ repository: | On Debian (>= 10), the clang-10 family of tools is available from the https://apt.llvm.org/ repository: | ||||
``` | ``` | ||||
wget https://apt.llvm.org/llvm.sh | wget https://apt.llvm.org/llvm.sh | ||||
chmod +x llvm.sh | chmod +x llvm.sh | ||||
sudo ./llvm.sh 10 | sudo ./llvm.sh 10 | ||||
``` | ``` | ||||
For example, for macOS: | For example, for macOS: | ||||
``` | ``` | ||||
curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz | tar -xJv | curl -L https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz | tar -xJv | ||||
ln -s $PWD/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-format /usr/local/bin/clang-format | ln -s $PWD/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-format /usr/local/bin/clang-format | ||||
ln -s $PWD/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-tidy /usr/local/bin/clang-tidy | ln -s $PWD/clang+llvm-10.0.0-x86_64-apple-darwin/bin/clang-tidy /usr/local/bin/clang-tidy | ||||
``` | ``` | ||||
If you are modifying a python script, you will need to install `mypy`. The minimum required version is 0.780, because | If you are modifying a python script, you will need to install `mypy` and `isort`. | ||||
the previous ones are known to have issues with some python type annotations. | The minimum required version for `mypy` is 0.780, because the previous ones are | ||||
known to have issues with some python type annotations. | |||||
On Debian based systems, this can be installed via: | On Debian based systems, this can be installed via: | ||||
``` | ``` | ||||
sudo apt-get install python3-pip | sudo apt-get install python3-pip | ||||
pip3 install mypy==0.780 | pip3 install isort==5.6.4 mypy==0.780 | ||||
echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.bashrc | echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.bashrc | ||||
source ~/.bashrc | source ~/.bashrc | ||||
``` | ``` | ||||
If you are modifying a shell script, you will need to install the `shellcheck` linter. | If you are modifying a shell script, you will need to install the `shellcheck` linter. | ||||
A recent version is required and may not be packaged for your distribution. | A recent version is required and may not be packaged for your distribution. | ||||
Standalone binaries are available for download on | Standalone binaries are available for download on | ||||
[the project's github release page](https://github.com/koalaman/shellcheck/releases). | [the project's github release page](https://github.com/koalaman/shellcheck/releases). | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |