Markdown linter (#5494)

* linter

* Add markdown linter

* add env

* only check markdown

* Add token

* Update .github/workflows/test-suite.yml

* Markdown linter

* Exit code

* Update script

* rename

* mdlint

* Add an empty line after end of file

* Testing disable

* add text

* update mdlint.sh

* ori validator inclusion

* Add config yml file

* Remove MD041 and fix advanced-datadir file

* FIx validator inclusion file conflict

* Merge branch 'unstable' into markdown-linter

* change files

* Merge branch 'markdown-linter' of https://github.com/chong-he/lighthouse into markdown-linter

* mdlint

* Remove MD025

* Remove MD036

* Remove MD045

* Removr MD001

* Set MD028 to false

* Remove MD024

* Remove MD055

* Remove MD029

* Remove MD040

* Set MD040 to false

* Set MD033 to false

* Set MD013 to false

* Rearrange yml file

* Update mdlint.sh and test

* Test remove fix

* Test with fix

* Test with space

* Fix summary indentation

* Test mdlint.sh

* Update mdlint.sh

* Test

* Update

* Test fix

* Test again

* Fix

* merge into check-code

* Update scripts/mdlint.sh

Co-authored-by: Mac L <mjladson@pm.me>

* Update scripts/mdlint.sh

Co-authored-by: Mac L <mjladson@pm.me>

* Remove set -e

* Add comment

* Merge pull request #7 from chong-he/unstable

Merge unstable to markdown branch

* mdlint

* Merge branch 'unstable' into markdown-linter

* mdlint
This commit is contained in:
chonghe
2024-05-24 10:45:19 +08:00
committed by GitHub
parent 7073242ccc
commit 3070cb7c39
68 changed files with 720 additions and 637 deletions

View File

@@ -23,7 +23,7 @@ The rustup installer provides an easy way to update the Rust compiler, and works
With Rust installed, follow the instructions below to install dependencies relevant to your
operating system.
#### Ubuntu
### Ubuntu
Install the following packages:
@@ -42,7 +42,7 @@ sudo apt update && sudo apt install -y git gcc g++ make cmake pkg-config llvm-de
After this, you are ready to [build Lighthouse](#build-lighthouse).
#### Fedora/RHEL/CentOS
### Fedora/RHEL/CentOS
Install the following packages:
@@ -52,7 +52,7 @@ yum -y install git make perl clang cmake
After this, you are ready to [build Lighthouse](#build-lighthouse).
#### macOS
### macOS
1. Install the [Homebrew][] package manager.
1. Install CMake using Homebrew:
@@ -61,21 +61,22 @@ After this, you are ready to [build Lighthouse](#build-lighthouse).
brew install cmake
```
[Homebrew]: https://brew.sh/
After this, you are ready to [build Lighthouse](#build-lighthouse).
#### Windows
### Windows
1. Install [Git](https://git-scm.com/download/win).
1. Install the [Chocolatey](https://chocolatey.org/install) package manager for Windows.
> Tips:
> - Use PowerShell to install. In Windows, search for PowerShell and run as administrator.
> - You must ensure `Get-ExecutionPolicy` is not Restricted. To test this, run `Get-ExecutionPolicy` in PowerShell. If it returns `restricted`, then run `Set-ExecutionPolicy AllSigned`, and then run
```bash
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
```
> - To verify that Chocolatey is ready, run `choco` and it should return the version.
1. Install Make, CMake and LLVM using Chocolatey:
@@ -158,14 +159,14 @@ FEATURES=gnosis,slasher-lmdb make
Commonly used features include:
* `gnosis`: support for the Gnosis Beacon Chain.
* `portable`: support for legacy hardware.
* `modern`: support for exclusively modern hardware.
* `slasher-lmdb`: support for the LMDB slasher backend. Enabled by default.
* `slasher-mdbx`: support for the MDBX slasher backend.
* `jemalloc`: use [`jemalloc`][jemalloc] to allocate memory. Enabled by default on Linux and macOS.
- `gnosis`: support for the Gnosis Beacon Chain.
- `portable`: support for legacy hardware.
- `modern`: support for exclusively modern hardware.
- `slasher-lmdb`: support for the LMDB slasher backend. Enabled by default.
- `slasher-mdbx`: support for the MDBX slasher backend.
- `jemalloc`: use [`jemalloc`][jemalloc] to allocate memory. Enabled by default on Linux and macOS.
Not supported on Windows.
* `spec-minimal`: support for the minimal preset (useful for testing).
- `spec-minimal`: support for the minimal preset (useful for testing).
Default features (e.g. `slasher-lmdb`) may be opted out of using the `--no-default-features`
argument for `cargo`, which can be plumbed in via the `CARGO_INSTALL_EXTRA_FLAGS` environment variable.
@@ -184,9 +185,9 @@ You can customise the compiler settings used to compile Lighthouse via
Lighthouse includes several profiles which can be selected via the `PROFILE` environment variable.
* `release`: default for source builds, enables most optimisations while not taking too long to
- `release`: default for source builds, enables most optimisations while not taking too long to
compile.
* `maxperf`: default for binary releases, enables aggressive optimisations including full LTO.
- `maxperf`: default for binary releases, enables aggressive optimisations including full LTO.
Although compiling with this profile improves some benchmarks by around 20% compared to `release`,
it imposes a _significant_ cost at compile time and is only recommended if you have a fast CPU.