Page MenuHomePhabricator

Support for static code analysis
Open, WishlistPublic

Description

Hi,

first I just found out about this project and it seems you're doing a hell of a job here - so many thanks for the work you do here!

Maintaining a good code quality is not an easy job. I've already seen you have added lint and continous build support.

In my experience (which is not much but I have some) static code analysis helps finding some ugly bugs that you might not spot during review. Integrating something like this into the code review process is the next evolutionary step that you already began with integrating lint there.

I have a few things on my mind on how something like this could be realized. (Not tied to Harbormaster since I don't know your projects so well - yet)

  • Some simple number that indicates the overall quality of the code would be nice. Take a look at https://scrutinizer-ci.com/g/sils1297/coala/ to see how scrutinizer does this.
  • IMO it is important that the user can extend and configure the rules easily
  • Since half a year I am working on coala which is a framework for those kinds of static code analysis rules. It is not yet finished but we think we may have a working version in the next weeks. (However code quality and full test coverage matters to us on this project so if it takes longer we wont rush it to match a date.) Maybe this could help.
  • I'd be happy to help myself. Though I can't make any promises on how much time/week I can allocate for this.

Event Timeline

sils1297 raised the priority of this task from to Needs Triage.
sils1297 updated the task description. (Show Details)
sils1297 added a project: Harbormaster.
sils1297 added a subscriber: sils1297.
epriestley triaged this task as Wishlist priority.Nov 14 2014, 1:11 PM
epriestley added a subscriber: epriestley.

We're probably at least 2+ years away from pursuing this.

See also some discussion in T1630, T4171.

Generally this can be implemented as lint rules (with a custom linter) if you're interested in showing architectural issues in code reviews.

Tracking code quality over time isn't feasible in the Phabricator architecture yet (I've tried, but the infrastructure provided by Fact is severely lacking to even pursue this as a patch or custom application).