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

Duplicate rules should be allowed #648

Open
moltar opened this issue Oct 6, 2023 · 2 comments
Open

Duplicate rules should be allowed #648

moltar opened this issue Oct 6, 2023 · 2 comments
Labels
Status: Proposal Request for comments

Comments

@moltar
Copy link

moltar commented Oct 6, 2023

I think duplicate rules should be allowed.

The use case is in a monorepo. Rules can be assembled from different locations (inputs) and provide different configuration options.

They are disallowed here:

if (registerSet.has(descriptorRule.id)) {
// TODO: more trivial implementation
throw new Error(`rule.id:${descriptorRule.id} is already registered.
Duplicated rule.id is something wrong in .secretlintrc.
`);
}

@azu azu added the Status: Proposal Request for comments label Oct 9, 2023
@azu
Copy link
Member

azu commented Oct 9, 2023

I think that there are not many useful cases in the current situation where rules can not be set for each file path like #105
So, I thought that most of the cases were set incorrectly, so I made it an error.

@moltar
Copy link
Author

moltar commented Oct 9, 2023

Yes, I think #105 can cover this use case in another way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Proposal Request for comments
Projects
None yet
Development

No branches or pull requests

2 participants