getredash / redash

Make Your Company Data Driven. Connect to any data source, easily visualize, dashboard and share your data.
http://redash.io/
BSD 2-Clause "Simplified" License
25.4k stars 4.3k forks source link

Loosen Code Climate Analysis Configuration #2727

Open jezdez opened 5 years ago

jezdez commented 5 years ago

Issue Summary

We've had a few issues in pull requests where the required Code Climate check hindered quick fixes and led to multiple code iterations to pass Code Climate's maintainability checks and effectively slowed down development.

Using Code Climate is great but should not create unnecessary refactoring churn (especially when the checked code isn't covered by automated tests). Instead we should loosen the analysis configuration to reflect the current state of the code.

Steps to Reproduce

  1. Open https://github.com/getredash/redash/pull/2656
  2. See issues relating to the number of function arguments (5 instead of allowed 4) and line numbers per function (36 instead of allowed 25).

These are just examples of course, but I would consider those settings to be indicators of hard to maintain code since it leads to splitting app logic between many different callables and spaghetti code eventually.

Note, there are 10 maintainability checks in total that we need to review for practicability in this project.

arikfr commented 5 years ago

I never intended for CodeClimate to block pull requests merging. It's just a helper tool to find really outstanding code/style issues.

I'm totally cool with loosening these checks (at least until we migrate from Angular).