funkwerk / gherkin_lint

Lints gherkin files
MIT License
38 stars 14 forks source link

Configurable rules #7

Closed johngluckmdsol closed 6 years ago

johngluckmdsol commented 7 years ago

We'd like to submit a PR for your gem that will allow us to configure your gem with custom rules. We'd do something like the following

  1. Create a configuration file (.gherkin_lint) to set the name of additional directories to read rules from (this would be lib/gherkin_lint/linter).
  2. Make GherkinLint.LINTER dynamic (no longer a constant) and read a glob based on the directories in the configuration
  3. Remove the --enable option. All directories would be included and then --disable would be processed. I'm not clear why the --enable option is necessary.

What do you think?

lindt commented 7 years ago

great ideas

  1. what specific linters are needed? could these be made generic?
  2. --enable is basically there for tests
johngluckmdsol commented 7 years ago

We want tests that make certain tags required and are looking towards a few more that are specific to our rules that wouldn't be applicable to the general population. When I implement them, I'll see if there's a way to make them more generic, but I can't see a way to do this currently

johngluckmdsol commented 7 years ago

Okay, well we will try to keep --enable.

johngluckmdsol commented 7 years ago

@lindt Will you please take a look at our fork and let us know if you want this linter in your code base or whether you want us to load it in ourselves?

It's easier to put it in your code if you think other people might want it

johngluckmdsol commented 6 years ago

I think this can be closed no