fedir/go-github-statistics

View on GitHub

Showing 5 of 5 total issues

Function rateGhData has 89 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func rateGhData(ghData []Repository) string {

    greetings := ""

    // Add points by repository total popularity (more popular is better)
Severity: Major
Found in competition.go - About 2 hrs to fix

    Function main has 55 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func main() {
        var (
            clearHTTPCache         = flag.Bool("cc", false, "Clear HTTP cache")
            clearHTTPCacheDryRun   = flag.Bool("ccdr", false, "Clear HTTP cache (dry run)")
            debug                  = flag.Bool("d", false, "Debug mode")
    Severity: Minor
    Found in ghstat.go - About 1 hr to fix

      Function rateGhData has 12 return statements (exceeds 4 allowed).
      Open

      func rateGhData(ghData []Repository) string {
      
          greetings := ""
      
          // Add points by repository total popularity (more popular is better)
      Severity: Major
      Found in competition.go - About 1 hr to fix

        Function repositoryData has 51 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func repositoryData(rKey string, tmpFolder string, debug bool, dataChan chan Repository, wg *sync.WaitGroup) {
        
            defer wg.Done()
        
            r := new(Repository)
        Severity: Minor
        Found in data.go - About 1 hr to fix

          Function repositoryData has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func repositoryData(rKey string, tmpFolder string, debug bool, dataChan chan Repository, wg *sync.WaitGroup) {
          Severity: Minor
          Found in data.go - About 35 mins to fix
            Severity
            Category
            Status
            Source
            Language