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

@@ -8,7 +8,6 @@
[stable]: https://github.com/sigp/lighthouse/tree/stable
[unstable]: https://github.com/sigp/lighthouse/tree/unstable
Lighthouse welcomes contributions. If you are interested in contributing to the
Ethereum ecosystem, and you want to learn Rust, Lighthouse is a great project
to work on.
@@ -56,8 +55,8 @@ Please use [clippy](https://github.com/rust-lang/rust-clippy) and
inconsistent code formatting:
```bash
$ cargo clippy --all
$ cargo fmt --all --check
cargo clippy --all
cargo fmt --all --check
```
### Panics
@@ -88,8 +87,9 @@ pub fn my_function(&mut self, _something &[u8]) -> Result<String, Error> {
**General Comments**
* Prefer line (``//``) comments to block comments (``/* ... */``)
* Comments can appear on the line prior to the item or after a trailing space.
- Prefer line (``//``) comments to block comments (``/* ... */``)
- Comments can appear on the line prior to the item or after a trailing space.
```rust
// Comment for this struct
struct Lighthouse {}
@@ -98,8 +98,8 @@ fn make_blockchain() {} // A comment on the same line after a space
**Doc Comments**
* The ``///`` is used to generate comments for Docs.
* The comments should come before attributes.
- The ``///`` is used to generate comments for Docs.
- The comments should come before attributes.
```rust
/// Stores the core configuration for this Lighthouse instance.
@@ -123,9 +123,9 @@ introduction and tutorial for the language).
Rust has a steep learning curve, but there are many resources to help. We
suggest:
* [Rust Book](https://doc.rust-lang.org/stable/book/)
* [Rust by example](https://doc.rust-lang.org/stable/rust-by-example/)
* [Learning Rust With Entirely Too Many Linked Lists](http://cglab.ca/~abeinges/blah/too-many-lists/book/)
* [Rustlings](https://github.com/rustlings/rustlings)
* [Rust Exercism](https://exercism.io/tracks/rust)
* [Learn X in Y minutes - Rust](https://learnxinyminutes.com/docs/rust/)
- [Rust Book](https://doc.rust-lang.org/stable/book/)
- [Rust by example](https://doc.rust-lang.org/stable/rust-by-example/)
- [Learning Rust With Entirely Too Many Linked Lists](http://cglab.ca/~abeinges/blah/too-many-lists/book/)
- [Rustlings](https://github.com/rustlings/rustlings)
- [Rust Exercism](https://exercism.io/tracks/rust)
- [Learn X in Y minutes - Rust](https://learnxinyminutes.com/docs/rust/)