Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose metadata inside the lint rule #2798

Closed
Tracked by #2797
ematipico opened this issue May 10, 2024 · 1 comment · Fixed by #2821
Closed
Tracked by #2797

Expose metadata inside the lint rule #2798

ematipico opened this issue May 10, 2024 · 1 comment · Fixed by #2821
Assignees
Labels
good first issue Good for newcomers S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@ematipico
Copy link
Member

ematipico commented May 10, 2024

This is a very easy task.

You should add this:

    pub fn metadata(&self) -> &RuleMetadata {
        &R::METADATA
    }

In here:

impl<'a, R> RuleContext<'a, R>

Please make sure to add proper documentation for the new function

@ematipico ematipico added good first issue Good for newcomers S-Help-wanted Status: you're familiar with the code base and want to help the project labels May 10, 2024
@dyc3
Copy link
Contributor

dyc3 commented May 12, 2024

I can pick this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants