fzipp / gocyclo

Calculate cyclomatic complexities of functions in Go source code.
BSD 3-Clause "New" or "Revised" License
1.33k stars 81 forks source link

Add a flag to skip test files #31

Closed haleyrc closed 3 years ago

haleyrc commented 4 years ago

This PR adds a flag to allow a user to easily skip test files during analysis for cases when the critical component is the code under test and not the tests themselves.

sebastianst commented 4 years ago

This would indeed be very helpful, please merge.

haleyrc commented 4 years ago

@sebastianst I'm pretty sure this repo is dead, but if you're interested I have this behavior implemented in my fork.

sebastianst commented 4 years ago

Oh indeed, last commit is from 2015. Any idea which gocyclo is used at goreportcard or code climate? Do you know of an active fork?

haleyrc commented 4 years ago

Not a clue, unfortunately. For disclosure's sake, I also wouldn't call my fork "active". If you do come across a well-maintained fork though, I would love to hear about it.

bkielbasa commented 3 years ago

Hi! I'm working on the alternative for this project https://github.com/bkielbasa/cyclop If you want to contribute, just do it :) I'll be happy to hear about ideas and PRs.

fzipp commented 3 years ago

Fixed by 4a36b7d43972d5dd35bc5204f7314dcb8cc848e4: -ignore flag added