0

I use code-climate integration in GitHub for a project and one of the engines in code climate is eslint. As of now, whenever a pull request is raised, eslint engine runs and checks for any issues and this is consuming a lot of time. The engines runs even if the changed files list does not contain a .js file.

Is there any way to run eslist only if there are changed .js files in the pull request? I know that eslint can be configured to check js files only. But what I need is to stop running eslint engine altogether if there are no js files in the changed files list.

Akshay
  • 790
  • 2
  • 8
  • 22

1 Answers1

3

Disclaimer: I work at Codacy

Codacy is a free for open source service that runs static analysis checks on your code. What we do is actually only run the tools (ESLint included) for the changed files, at least after the first analysis. Give it a try and let us know if you have any feedback.

rtfpessoa
  • 521
  • 2
  • 16
  • Thank you for the suggestion. I do not have administrator privileges to change the code analysis tool used in the project. But I can definitely check out Codacy and discuss it with the team. Thanks! – Akshay Mar 31 '17 at 06:33
  • Do you use any build tool apart from gulp to do that? And also do you do it in watch mode? – Abhinav Singi Apr 11 '17 at 09:22
  • We do not use gulp. We use an internal cache to manager the files we analyse. – rtfpessoa Apr 11 '17 at 12:24