Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[fix lint warnings: Uniques pallet] fix clippy::doc_markdown warnings #14592

Merged
merged 7 commits into from
Jul 24, 2023

Conversation

sacha-l
Copy link
Contributor

@sacha-l sacha-l commented Jul 17, 2023

This PR fixes the 481 warnings emitted by the doc_markdown lint for the Uniques pallet.

Note: These lint warnings should no longer happen for newly generated weight files thanks to #14535.

This is part of an ongoing effort from the https://github.com/orgs/paritytech/teams/devrel team to improve developer experience.

@sacha-l sacha-l added A0-please_review Pull request needs code review. I6-documentation Documentation needs fixing, improving or augmenting. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jul 17, 2023
@sacha-l sacha-l requested a review from aaronbassett July 17, 2023 15:44
@sacha-l sacha-l requested a review from jsidorenko as a code owner July 17, 2023 15:44
@sacha-l sacha-l requested a review from a team July 17, 2023 15:44
@sacha-l sacha-l changed the title Fix clippy::doc_markdown warnings [fix lint warnings: Uniques pallet] fix clippy::doc_markdown warnings Jul 17, 2023
@ggwpez
Copy link
Member

ggwpez commented Jul 17, 2023

bot bench $ pallet dev pallet_uniques

Actually running the benches should also fix it - and tell us if my fix was good 😄

@command-bot
Copy link

command-bot bot commented Jul 17, 2023

@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3204420 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_uniques. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 12-1a3ed205-d0c9-4c0c-a5fd-df85ab0e5318 to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Jul 17, 2023

@ggwpez Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_uniques has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3204420 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3204420/artifacts/download.

Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sacha-l can you please run the linter again?
The weights got updated by the bot now.

@sacha-l
Copy link
Contributor Author

sacha-l commented Jul 18, 2023

@sacha-l can you please run the linter again? The weights got updated by the bot now.

Ran it locally - there's still some warnings:

warning: item in documentation is missing backticks
  --> frame/uniques/src/weights.rs:18:31
   |
18 | //! Autogenerated weights for pallet_uniques
   |                               ^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
   = note: requested on the command line with `-W clippy::doc-markdown`
help: try
   |
18 | //! Autogenerated weights for `pallet_uniques`
   |                               ~~~~~~~~~~~~~~~~

warning: backticks are unbalanced
  --> frame/uniques/src/weights.rs:20:1
   |
20 | / //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
21 | | //! DATE: 2023-07-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
22 | | //! WORST CASE MAP SIZE: `1000000`
23 | | //! HOSTNAME: `runner-gghbxkbs-project-145-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
24 | | //! EXECUTION: ``, WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: `1024`
   | |_____________________________________________________________________________________^
   |
   = help: a backtick may be missing a pair
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown

warning: item in documentation is missing backticks
  --> frame/uniques/src/weights.rs:50:33
   |
50 | /// Weight functions needed for pallet_uniques.
   |                                 ^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
   |
50 | /// Weight functions needed for `pallet_uniques`.
   |                                 ~~~~~~~~~~~~~~~~

warning: item in documentation is missing backticks
  --> frame/uniques/src/weights.rs:80:17
   |
80 | /// Weights for pallet_uniques using the Substrate node and recommended hardware.
   |                 ^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_markdown
help: try
   |
80 | /// Weights for `pallet_uniques` using the Substrate node and recommended hardware.
   |                 ~~~~~~~~~~~~~~~~

warning: `pallet-uniques` (lib) generated 4 warnings (run `cargo clippy --fix --lib -p pallet-uniques` to apply 3 suggestions)

@ggwpez
Copy link
Member

ggwpez commented Jul 18, 2023

Ran it locally - there's still some warnings:

What command are you running?
If you want to have this also working in the future then we need to integrate it into the CI, otherwise someone will silently break it.
Updating these files manually does not really work, since they auto-generated, so any change will be over-written eventually.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@sacha-l
Copy link
Contributor Author

sacha-l commented Jul 19, 2023

What command are you running?

cargo clippy -- -A clippy::all -W clippy::doc_markdown --no-deps

Updating these files manually does not really work, since they auto-generated, so any change will be over-written eventually.

Yes - shouldn't we update the template with the missing backticks?

@ggwpez
Copy link
Member

ggwpez commented Jul 19, 2023

bot bench $ pallet dev pallet_uniques

@command-bot
Copy link

command-bot bot commented Jul 19, 2023

@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3223649 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_uniques. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 23-87ba5193-bc7f-480a-983b-5ac826242ccb to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Jul 19, 2023

@ggwpez Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_uniques has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3223649 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3223649/artifacts/download.

@sacha-l
Copy link
Contributor Author

sacha-l commented Jul 24, 2023

bot merge

@paritytech-processbot paritytech-processbot bot merged commit 0a97adf into master Jul 24, 2023
@paritytech-processbot paritytech-processbot bot deleted the sl/fix-doc_markdown-errors branch July 24, 2023 14:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit I6-documentation Documentation needs fixing, improving or augmenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants