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

chore(new-lintrule): improve category generation to avoid git conflicts #4665

Merged
merged 1 commit into from
Jul 9, 2023
Merged

chore(new-lintrule): improve category generation to avoid git conflicts #4665

merged 1 commit into from
Jul 9, 2023

Conversation

Conaclos
Copy link
Contributor

@Conaclos Conaclos commented Jul 7, 2023

Summary

This PR tries to reduce git conflicts between PRs that add new lint rules.
To do that, the nursery rules in the categories.rs file are sorted.

We could also reduce conflicts in nursery.rs file by spreading the declare_group! on multiple lines.
However, I don't know how to apply formatting in the quote! macro...

Test Plan

I manually tested via just new-lintrule.

@netlify
Copy link

netlify bot commented Jul 7, 2023

Deploy Preview for docs-rometools failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit 0593d00
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/64aabe39640a7600088b7582

@github-actions github-actions bot added A-Tooling Area: our own build, development, and release tooling A-Diagnostic Area: errors and diagnostics labels Jul 7, 2023
@Conaclos Conaclos requested a review from ematipico July 7, 2023 11:27
@ematipico
Copy link
Contributor

ematipico commented Jul 8, 2023

However, I don't know how to apply formatting in the quote! macro...

Rust fmt doesn't format content inside macros, that's why.

You would need to format them manually. To do so, you'd need:

@github-actions github-actions bot added the A-Linter Area: linter label Jul 9, 2023
@Conaclos
Copy link
Contributor Author

Conaclos commented Jul 9, 2023

@ematipico
Thanks for your help!

Actually, I don't need to sort, since it is already sorted (via file order I think).

These changes should improve the experience of contributors :)

@Conaclos Conaclos merged commit 4254680 into rome:main Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Diagnostic Area: errors and diagnostics A-Linter Area: linter A-Tooling Area: our own build, development, and release tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants