codeclimate / codeclimate-duplication

Code Climate engine for code duplication analysis
http://codeclimate.com
MIT License
114 stars 24 forks source link

Adding extension to JS Analyzer #73

Closed 8bitDesigner closed 8 years ago

8bitDesigner commented 8 years ago

Hi all, we use [sprockets-es6] in our Rails project which requires all ES6-ish JS files be written with the .es6 extension. As best I can tell, this analyzer only uses .js and .jsx extensions when building its list of files to analyze. Is there any way to add .es6 to that list?

gdiggs commented 8 years ago

@8bitDesigner yep! If you specify a paths key in your .codeclimate.yml file, you should be able to include them. For example:

engines:
  duplication:
    enabled: true
    config:
      languages:
        javascript:
          paths:
            - "**/*.es6"
  ...
8bitDesigner commented 8 years ago

Brilliant, thank you!

8bitDesigner commented 8 years ago

Perfect, thank you!

On Fri, Jan 8, 2016, at 01:31 PM, Gordon Diggs wrote:

@8bitDesigner[1] yep! If you specify a paths key in your .codeclimate.yml file, you should be able to include them. For example:

engines: duplication: enabled: true config: languages: javascript: paths: - "*/.es6" ... — Reply to this email directly or view it on GitHub[2].

Links:

  1. https://github.com/8bitDesigner
  2. https://github.com/codeclimate/codeclimate-duplication/issues/73#issuecomment-170132334