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

Checking file-naming convention #8

Open
FieryCod opened this issue May 7, 2017 · 1 comment
Open

Checking file-naming convention #8

FieryCod opened this issue May 7, 2017 · 1 comment

Comments

@FieryCod
Copy link

FieryCod commented May 7, 2017

I'm having an issue understanding whereas codeclimate-grep is capable of checking file naming conventions. What I want to achieve is to check whether a file name foo_bar.js is written in kebab-case.
AFAIK codeclimate-grep is only searching for patterns inside a file and is unable to check the file name am I right?

@pointlessone
Copy link
Contributor

Hi Karol,

Unfortunately, this engine is designed to only check files content.

Nonetheless, I think it's possible to "hack" it to do what you want but it's not a supported use case.

Try this config:

patterns:
  kebab:
    pattern: .*
    annotation: "Don't use _ in file names"
    severity: minor
    categories: Bug Risk
    path_patterns:
      - "**/*_*"

@wfleming wfleming removed their assignment Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants