question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for multiple ignore-* rules in configuration file

See original GitHub issue

Hi there 👋 Thank you for providing this amazing project to the community!

I recently stumbled upon a disturbing issue: we cannot define multiple ignore-by-title sections in the .gitlint configuration. It means that I cannot define different rules to ignore given a particular regex.

Did I missed something? Is this a limitation of the ini/cfg format?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jorisrooverscommented, Sep 25, 2020

2+ years later…

I just implemented ‘Named Rules’ which allows users to have multiple of the same rule active at the same time, like so:

# .gitlint file

[ignore-by-title:first-instance]
regex=(.*)ignore(.*)
ignore=all

[ignore-by-title:second-instance]
regex=(.*)foobar(.*)
ignore=B6

[ignore-by-title:thisCanReallyBeWhateverYouWant]
regex=(.*)hurdur(.*)
ignore=T2,T3

Of course it’s possible to create conflicting rules this way, but that’s up to the user to make sure that doesn’t happen.

This should solve this use-case 😃 This will go out as part of 0.14, somewhere in next few weeks.

1reaction
jmaupetitcommented, Jun 8, 2018

it also has to do with how gitlint stores rules internally (only 1 instance of each rule can be active at once).

True, that why I’ve said that it would be deep refactoring.

I like your proposal, let’s do this!

Nothing hurries, let’s keep in touch and keep up the good work! 💪

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignore Rules - JFrog Documentation
Ignoring Violations Examples; Viewing Ignore Rules and Info; Deleting an Ignore Rule; Searching for Ignored Violations; REST API Support. Page ...
Read more >
Add Ignore Rules - Trellix Product Documentation
Add Ignore Rules You can select a particular alert and configure an ignore rule. If necessary, you can create a new ignore rule...
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
ESLint supports adding shared settings into configuration files. Plugins use settings to specify the information that should be shared across all of its...
Read more >
Configuration | Stylelint
The .stylelintrc file (without extension) can be in JSON or YAML format. You can add a ... Each rule configuration fits one of...
Read more >
Ignoring files, folders, or code - Semgrep
To ignore blocks of code for a particular rule, enter its rule-id as follows: nosemgrep: RULE_ID . To ignore multiple rules, use a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found