credo icon indicating copy to clipboard operation
credo copied to clipboard

feat: Add Ignore option for Credo.Check.Readability.ModuleNames

Open BobrImperator opened this issue 3 years ago • 2 comments

  • Adds :ignore param
    • :ignore is a list of regexes
  • Adds tests for the functionality

Given ignore: [~r/Sample_Module$/]

Credo.Sample_Module will pass ✅ Credo.Another_Module.Sample_Module will fail ❌

Context: On our project for versioning reasons, we decided to add an API version to a module name, but credo didn't have an option to configure it.

closes https://github.com/rrrene/credo-proposals/issues/83

BobrImperator avatar Sep 02 '22 10:09 BobrImperator

Why would you open a PR for something and then write a proposal for it 40 minutes later?

rrrene avatar Sep 02 '22 13:09 rrrene

@rrrene I thought that's the process and that It'd also be nice for discoverability. And the reason the proposal was later was that I discovered the repo only after initial implementation.

BobrImperator avatar Sep 02 '22 13:09 BobrImperator

This is part of Credo v1.7.0-rc.1 :+1:

rrrene avatar Dec 31 '22 15:12 rrrene