{"id":16946112,"url":"https://github.com/lsegal/complexity","last_synced_at":"2025-04-11T15:32:20.908Z","repository":{"id":656196,"uuid":"298906","full_name":"lsegal/complexity","owner":"lsegal","description":"Calculates the McCabe cyclomatic complexity index of the methods in your Ruby code.","archived":false,"fork":false,"pushed_at":"2009-09-06T18:27:59.000Z","size":84,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T05:33:30.788Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lsegal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-09-06T04:24:38.000Z","updated_at":"2016-09-22T18:46:51.000Z","dependencies_parsed_at":"2022-07-05T06:31:22.473Z","dependency_job_id":null,"html_url":"https://github.com/lsegal/complexity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fcomplexity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fcomplexity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fcomplexity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lsegal%2Fcomplexity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lsegal","download_url":"https://codeload.github.com/lsegal/complexity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248081156,"owners_count":21044632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T21:25:00.963Z","updated_at":"2025-04-11T15:32:20.613Z","avatar_url":"https://github.com/lsegal.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Complexity\n==========\n\nWritten by Loren Segal in 2009\n\nSYNOPSIS\n--------\n\nCalculates the McCabe [cyclomatic complexity][1] index of the methods in your Ruby code.\nThe calculation is a basic `NUMBER_OF_BRANCHES + 1` calculation which can be used \nthis calculation to approximate the minimum number of test cases for each of\nyour methods ([complexity should equal number of test cases][3]). You can also use\nthis value to find overly complex method and refactor them into simpler ones.\n\nSome more reading can be found at [http://www.linuxjournal.com/article/8035][1].\n\nUSAGE\n-----\n\n* Requires [YARD][3]\n\nSyntax: `ruby complexity.rb [--csv] GLOB_OF_FILES` \n\nIf you want CSV output, add --csv. `GLOB_OF_FILES` defaults to `lib/**/*.rb`.\n\n[1]: http://en.wikipedia.org/wiki/Cyclomatic_complexity \"Cyclomatic Complexity\"\n[2]: http://users.csc.calpoly.edu/~jdalbey/206/Lectures/BasisPathTutorial/index.html \"Basis Path Testing\"\n[3]: http://yard.soen.ca \"Yay! A Ruby Documentation Tool\"\n[4]: http://www.linuxjournal.com/article/8035","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsegal%2Fcomplexity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flsegal%2Fcomplexity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flsegal%2Fcomplexity/lists"}