{"id":17039047,"url":"https://github.com/dcnick3/ifcount","last_synced_at":"2025-10-08T12:41:06.747Z","repository":{"id":195356945,"uuid":"692760762","full_name":"DCNick3/ifcount","owner":"DCNick3","description":"Count number of ifs in your rust project!","archived":false,"fork":false,"pushed_at":"2023-12-01T21:49:29.000Z","size":566,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T17:44:27.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCNick3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-17T14:01:30.000Z","updated_at":"2024-08-24T22:21:46.000Z","dependencies_parsed_at":"2025-04-12T14:02:42.011Z","dependency_job_id":"5d940a26-a7fd-4515-8d40-2c4b8cc1cb15","html_url":"https://github.com/DCNick3/ifcount","commit_stats":null,"previous_names":["dcnick3/ifcount"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/DCNick3/ifcount","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fifcount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fifcount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fifcount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fifcount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCNick3","download_url":"https://codeload.github.com/DCNick3/ifcount/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Fifcount/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278947919,"owners_count":26073735,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-14T08:58:30.302Z","updated_at":"2025-10-08T12:41:06.701Z","avatar_url":"https://github.com/DCNick3.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![test suite](https://github.com/DCNick3/ifcount/actions/workflows/test.yml/badge.svg?event=push)\n\n![](media/ifcount.gif)\n\nA _long awaited_ solution for a _widely encountered_ problem!\n\nThe \u003cimg src=\"media/ifcount.gif\" alt=\"ifcount\" height=\"18\" style=\"vertical-align: middle;\"/\u003e will count the number of ifs in your rust project!\n\n(it can also collect some other numerical metrics, but we know what you are here for)\n\n## Usage example\n\nTo run against a github repo:\n\n```bash\n$ ifcount collect-github-repo DCNick3/shin\n```\n\nThis command will run all the metric collectors and print the results to stdout in json format.\n\nThe fetched sources will be cached in `~/.cache/ifcount` (see [docs for directories crate](https://docs.rs/directories/latest/directories/) for locations on other OSes) so that the next time you run the command it will be much faster.\n\nIf you want to run against a local repo, you can do so. NOTE: this will not collect some metrics that are specific to github repos (like number of stars, number of forks, etc.)\n\nThe command is:\n\n```bash\n$ ifcount collect-local-repo path_to_your_repo\n```\n\n## Json example\n\n```json5\n{\n  \"meta\": {\n    \"url\": \"git@github.com:DCNick3/ifcount.git\",\n    \"commit\": \"796ae0c921825b812fd0f25bdda2dd42005806c5\"\n  },\n  \"metrics\": {\n    \"metric1\": [1,2,3,4,5],\n    \"metric2\": [1,2,3],\n    // ...\n  }\n}\n```\n\n## Metrics\n\n### File metrics\n\n- `per_file.all_fn_count.avg`: Average number of functions per file.\n- `per_file.all_fn_count.mode`: Mode (most common) number of functions per file.\n- `per_file.all_fn_count.sum`: Total number of functions across all files.\n- `per_file.enum_count.avg`: Average number of enums per file.\n- `per_file.enum_count.mode`: Mode (most common) number of enums per file.\n- `per_file.enum_count.sum`: Total number of enums across all files.\n- `per_file.impl_block_count.avg`: Average number of impl blocks per file.\n- `per_file.impl_block_count.mode`: Mode (most common) number of impl blocks per file.\n- `per_file.impl_block_count.sum`: Total number of impl blocks across all files.\n- `per_file.pub_fn_count.avg`: Average number of public functions per file.\n- `per_file.pub_fn_count.mode`: Mode (most common) number of public functions per file.\n- `per_file.pub_fn_count.sum`: Total number of public functions across all files.\n- `per_file.struct_count.avg`: Average number of structs per file.\n- `per_file.struct_count.mode`: Mode (most common) number of structs per file.\n- `per_file.struct_count.sum`: Total number of structs across all files.\n- `macro.count_per_file.avg`: Average number of macros per file.\n- `macro.count_per_file.mode`: Mode of the number of macros per file.\n- `macro.count_per_file.sum`: Total number of macros per file.\n\n### Function metrics\n\n- `complexity.closure.avg`: Average complexity [2] of closures in the code.\n- `complexity.closure.mode`: Mode (most common) complexity [2] of closures in the code.\n- `complexity.closure.sum`: Total complexity [2] of closures in the code.\n- `complexity.impl_item_fn.avg`: Average complexity [2] of functions within impl blocks.\n- `complexity.impl_item_fn.mode`: Mode (most common) complexity [2] of functions within impl blocks.\n- `complexity.impl_item_fn.sum`: Total complexity [2] of functions within impl blocks.\n- `complexity.item_fn.avg`: Average complexity [2] of standalone functions in the code.\n- `complexity.item_fn.mode`: Mode (most common) complexity [2] of standalone functions in the code.\n- `complexity.item_fn.sum`: Total complexity [2] of standalone functions in the code.\n- `fn_arg_count.avg`: Average number of arguments in functions.\n- `fn_arg_count.mode`: Mode (most common) number of arguments in functions.\n- `fn_arg_count.sum`: Total number of arguments in functions.\n- `fn_depth.avg`: Average depth (nesting) of functions in the code.\n- `fn_depth.mode`: Mode (most common) depth (nesting) of functions in the code.\n- `fn_depth.sum`: Total depth (nesting) of functions in the code.\n- `lcom4_per_impl_block.avg`: Average LCOM4 metric [3] per impl block.\n- `lcom4_per_impl_block.mode`: Mode (most common) LCOM4 metric [3] per impl block.\n- `lcom4_per_impl_block.sum`: Total LCOM4 metric [3] across all impl blocks.\n- `statement_size.avg`: Average size (number of expressions) of statements in the code.\n- `statement_size.mode`: Mode (most common) size (number of expressions) of statements in the code.\n- `statement_size.sum`: Total size (number of expressions) of statements in the code.\n- `macro.argument_size.avg`: Average size of macro arguments.\n- `macro.argument_size.mode`: Mode of macro argument size.\n- `macro.argument_size.sum`: Total size of macro arguments.\n- `rca.function.cognitive.average`: Average cognitive complexity of functions [1]\n- `rca.function.cognitive.max`: Maximum cognitive complexity of functions [1]\n- `rca.function.cognitive.min`: Minimum cognitive complexity of functions [1]\n- `rca.function.cognitive.sum`: Sum of cognitive complexity of functions [1]\n- `rca.function.cyclomatic.average`: Average cyclomatic complexity of functions [1]\n- `rca.function.cyclomatic.max`: Maximum cyclomatic complexity of functions [1]\n- `rca.function.cyclomatic.min`: Minimum cyclomatic complexity of functions [1]\n- `rca.function.cyclomatic.sum`: Sum of cyclomatic complexity of functions [1]\n- `rca.function.loc.blank`: Number of blank lines in functions [1]\n- `rca.function.loc.blank_average`: Average number of blank lines in functions [1]\n- `rca.function.loc.blank_max`: Maximum number of blank lines in functions [1]\n- `rca.function.loc.blank_min`: Minimum number of blank lines in functions [1]\n- `rca.function.loc.cloc`: Number of comment lines in functions [1]\n- `rca.function.loc.cloc_average`: Average number of comment lines in functions [1]\n- `rca.function.loc.cloc_max`: Maximum number of comment lines in functions [1]\n- `rca.function.loc.cloc_min`: Minimum number of comment lines in functions [1]\n- `rca.function.loc.lloc`: Number of logical lines of code in functions [1]\n- `rca.function.loc.lloc_average`: Average number of logical lines of code in functions [1]\n- `rca.function.loc.lloc_max`: Maximum number of logical lines of code in functions [1]\n- `rca.function.loc.lloc_min`: Minimum number of logical lines of code in functions [1]\n- `rca.function.loc.ploc`: Number of physical lines of code in functions [1]\n- `rca.function.loc.ploc_average`: Average number of physical lines of code in functions [1]\n- `rca.function.loc.ploc_max`: Maximum number of physical lines of code in functions [1]\n- `rca.function.loc.ploc_min`: Minimum number of physical lines of code in functions [1]\n- `rca.function.loc.sloc`: Number of source lines of code in functions [1]\n- `rca.function.loc.sloc_average`: Average number of source lines of code in functions [1]\n- `rca.function.loc.sloc_max`: Maximum number of source lines of code in functions [1]\n- `rca.function.loc.sloc_min`: Minimum number of source lines of code in functions [1]\n- `rca.function.nargs.average`: Average number of arguments in functions [1]\n- `rca.function.nargs.average_closures`: Average number of arguments in closures [1]\n- `rca.function.nargs.average_functions`: Average number of arguments in functions [1]\n- `rca.function.nargs.closures_max`: Maximum number of arguments in closures [1]\n- `rca.function.nargs.closures_min`: Minimum number of arguments in closures [1]\n- `rca.function.nargs.functions_max`: Maximum number of arguments in functions [1]\n- `rca.function.nargs.functions_min`: Minimum number of arguments in functions [1]\n- `rca.function.nargs.total`: Total number of arguments in functions [1]\n- `rca.function.nargs.total_closures`: Total number of arguments in closures [1]\n- `rca.function.nargs.total_functions`: Total number of arguments in functions [1]\n- `rca.function.nexits.average`: Average number of exits in functions [1]\n- `rca.function.nexits.max`: Maximum number of exits in functions [1]\n- `rca.function.nexits.min`: Minimum number of exits in functions [1]\n- `rca.function.nexits.sum`: Sum of number of exits in functions [1]\n- `rca.function.nom.average`: Average number of methods in functions [1]\n- `rca.function.nom.closures`: Number of methods in closures [1]\n- `rca.function.nom.closures_average`: Average number of methods in closures [1]\n- `rca.function.nom.closures_max`: Maximum number of methods in closures [1]\n- `rca.function.nom.closures_min`: Minimum number of methods in closures [1]\n- `rca.function.nom.functions`: Number of methods in functions [1]\n- `rca.function.nom.functions_average`: Average number of methods in functions [1]\n- `rca.function.nom.functions_max`: Maximum number of methods in functions [1]\n- `rca.function.nom.functions_min`: Minimum number of methods in functions [1]\n- `rca.function.nom.total`: Total number of methods in functions [1]\n- `rca.function.halstead.N1`: Number of distinct operators and operands in functions [1]\n- `rca.function.halstead.N2`: Total number of operators and operands in functions [1]\n- `rca.function.halstead.bugs`: Estimated number of bugs in functions [1]\n- `rca.function.halstead.difficulty`: Program difficulty in functions [1]\n- `rca.function.halstead.effort`: Effort required to maintain functions [1]\n- `rca.function.halstead.estimated_program_length`: Estimated program length of functions [1]\n- `rca.function.halstead.length`: Actual length of functions [1]\n- `rca.function.halstead.level`: Program level of functions [1]\n- `rca.function.halstead.n1`: Number of distinct operators and operands in functions [1]\n- `rca.function.halstead.n2`: Total number of operators and operands in functions [1]\n- `rca.function.halstead.purity_ratio`: Purity ratio of functions [1]\n- `rca.function.halstead.time`: Time required to maintain functions [1]\n- `rca.function.halstead.vocabulary`: Operator and operand vocabulary in functions [1]\n- `rca.function.halstead.volume`: Volume of functions [1]\n- `rca.function.mi.mi_original`: Maintainability index of functions (original formula) [1]\n- `rca.function.mi.mi_sei`: Maintainability index of functions (SEI method) [1]\n- `rca.function.mi.mi_visual_studio`: Maintainability index of functions (Visual Studio method) [1]\n\n\n### Definition metrics\n\n- `enums.attr_count.avg`: Average number of attributes per enum.\n- `enums.attr_count.mode`: Mode (most common) number of attributes per enum.\n- `enums.attr_count.sum`: Total number of attributes across all enums.\n- `enums.variant_attr_count.avg`: Average number of attributes per enum variant.\n- `enums.variant_attr_count.mode`: Mode (most common) number of attributes per enum variant.\n- `enums.variant_attr_count.sum`: Total number of attributes across all enum variants.\n- `enums.variant_count.avg`: Average number of variants per enum.\n- `enums.variant_count.mode`: Mode (most common) number of variants per enum.\n- `enums.variant_count.sum`: Total number of variants across all enums.\n- `structs.attrs_count.avg`: Average number of attributes per struct.\n- `structs.attrs_count.mode`: Mode (most common) number of attributes per struct.\n- `structs.attrs_count.sum`: Total number of attributes across all structs.\n- `structs.field_attr_count.avg`: Average number of attributes per struct field.\n- `structs.field_attr_count.mode`: Mode (most common) number of attributes per struct field.\n- `structs.field_attr_count.sum`: Total number of attributes across all struct fields.\n- `structs.fields_count.avg`: Average number of fields per struct.\n- `structs.fields_count.mode`: Mode (most common) number of fields per struct.\n- `structs.fields_count.sum`: Total number of fields across all structs.\n- `structs.public_fields_count.avg`: Average number of public fields per struct.\n- `structs.public_fields_count.mode`: Mode (most common) number of public fields per struct.\n- `structs.public_fields_count.sum`: Total number of public fields across all structs.\n- `trait_def.all_fn_count.avg`: Average number of functions within trait definitions.\n- `trait_def.all_fn_count.mode`: Mode (most common) number of functions within trait definitions.\n- `trait_def.all_fn_count.sum`: Total number of functions within trait definitions.\n- `trait_def.assoc_type_count.avg`: Average number of associated types within trait definitions.\n- `trait_def.assoc_type_count.mode`: Mode (most common) number of associated types within trait definitions.\n- `trait_def.assoc_type_count.sum`: Total number of associated types within trait definitions.\n- `trait_def.default_fn_count.avg`: Average number of default functions within trait definitions.\n- `trait_def.default_fn_count.mode`: Mode (most common) number of default functions within trait definitions.\n- `trait_def.default_fn_count.sum`: Total number of default functions within trait definitions.\n- `trait_def.generic_param_count.avg`: Average number of generic parameters within trait definitions.\n- `trait_def.generic_param_count.mode`: Mode (most common) number of generic parameters within trait definitions.\n- `trait_def.generic_param_count.sum`: Total number of generic parameters within trait definitions.\n- `trait_def.supertrait_count.avg`: Average number of supertraits within trait definitions.\n- `trait_def.supertrait_count.mode`: Mode (most common) number of supertraits within trait definitions.\n- `trait_def.supertrait_count.sum`: Total number of supertraits within trait definitions.\n- `rca.impl.cyclomatic.average`: Average cyclomatic complexity of code in impl block [1]\n- `rca.impl.cyclomatic.max`: Maximum cyclomatic complexity of code in impl block [1]\n- `rca.impl.cyclomatic.min`: Minimum cyclomatic complexity of code in impl block [1]\n- `rca.impl.cyclomatic.sum`: Sum of cyclomatic complexity of impl block [1]\n- `rca.impl.halstead.N1`: Halstead volume metric for impl block [1]\n- `rca.impl.halstead.N2`: Halstead vocabulary metric for impl block [1]\n- `rca.impl.halstead.bugs`: Estimated number of bugs in impl block using Halstead metric [1]\n- `rca.impl.halstead.difficulty`: Difficulty level of impl block calculated using Halstead metric [1]\n- `rca.impl.halstead.effort`: Effort required to write impl block using Halstead metric [1]\n- `rca.impl.halstead.estimated_program_length`: Estimated length of impl block using Halstead metric [1]\n- `rca.impl.halstead.length`: Length of impl block using Halstead metric [1]\n- `rca.impl.halstead.level`: Level of impl block calculated using Halstead metric [1]\n- `rca.impl.halstead.n1`: Number of distinct operators in impl block using Halstead metric [1]\n- `rca.impl.halstead.n2`: Number of distinct operands in impl block using Halstead metric [1]\n- `rca.impl.halstead.purity_ratio`: Purity ratio of impl block using Halstead metric [1]\n- `rca.impl.halstead.time`: Time required to write impl block using Halstead metric [1]\n- `rca.impl.halstead.vocabulary`: Vocabulary of impl block using Halstead metric [1]\n- `rca.impl.halstead.volume`: Volume of impl block using Halstead metric [1]\n- `rca.impl.loc.blank`: Number of blank lines in impl block [1]\n- `rca.impl.loc.blank_average`: Average number of blank lines in impl block [1]\n- `rca.impl.loc.blank_max`: Maximum number of blank lines in impl block [1]\n- `rca.impl.loc.blank_min`: Minimum number of blank lines in impl block [1]\n- `rca.impl.loc.cloc`: Count of lines of impl block [1]\n- `rca.impl.loc.cloc_average`: Average count of lines of impl block [1]\n- `rca.impl.loc.cloc_max`: Maximum count of lines of impl block [1]\n- `rca.impl.loc.cloc_min`: Minimum count of lines of impl block [1]\n- `rca.impl.loc.lloc`: Logical lines of code in impl block [1]\n- `rca.impl.loc.lloc_average`: Average logical lines of code in impl block [1]\n- `rca.impl.loc.lloc_max`: Maximum logical lines of code in impl block [1]\n- `rca.impl.loc.lloc_min`: Minimum logical lines of code in impl block [1]\n- `rca.impl.loc.ploc`: Physical lines of code in impl block [1]\n- `rca.impl.loc.ploc_average`: Average physical lines of code in impl block [1]\n- `rca.impl.loc.ploc_max`: Maximum physical lines of code in impl block [1]\n- `rca.impl.loc.ploc_min`: Minimum physical lines of code in impl block [1]\n- `rca.impl.loc.sloc`: Source lines of code in impl block [1]\n- `rca.impl.loc.sloc_average`: Average source lines of code in impl block [1]\n- `rca.impl.loc.sloc_max`: Maximum source lines of code in impl block [1]\n- `rca.impl.loc.sloc_min`: Minimum source lines of code in impl block [1]\n- `rca.impl.mi.mi_original`: Maintainability Index of impl block based on the original formula [1]\n- `rca.impl.mi.mi_sei`: Maintainability Index of impl block based on the SEI formula [1]\n- `rca.impl.mi.mi_visual_studio`: Maintainability Index of impl block based on Visual Studio implementation [1]\n- `rca.impl.nargs.average`: Average number of arguments in impl block [1]\n- `rca.impl.nargs.average_closures`: Average number of arguments in closures in impl block [1]\n- `rca.impl.nargs.average_functions`: Average number of arguments in functions in impl block [1]\n- `rca.impl.nargs.closures_max`: Maximum number of arguments in closures in impl block [1]\n- `rca.impl.nargs.closures_min`: Minimum number of arguments in closures in impl block [1]\n- `rca.impl.nargs.functions_max`: Maximum number of arguments in functions in impl block [1]\n- `rca.impl.nargs.functions_min`: Minimum number of arguments in functions in impl block [1]\n- `rca.impl.nargs.total`: Total number of arguments in impl block [1]\n- `rca.impl.nargs.total_closures`: Total number of arguments in closures in impl block [1]\n- `rca.impl.nargs.total_functions`: Total number of arguments in functions in impl block [1]\n- `rca.impl.nom.average`: Average number of methods in impl block [1]\n- `rca.impl.nom.closures`: Number of methods in closures in impl block [1]\n- `rca.impl.nom.closures_average`: Average number of methods in closures in impl block [1]\n- `rca.impl.nom.closures_max`: Maximum number of methods in closures in impl block [1]\n- `rca.impl.nom.closures_min`: Minimum number of methods in closures in impl block [1]\n- `rca.impl.nom.functions`: Number of methods in functions in impl block [1]\n- `rca.impl.nom.functions_average`: Average number of methods in functions in impl block [1]\n- `rca.impl.nom.functions_max`: Maximum number of functions in impl block [1]\n- `rca.impl.nom.functions_min`: Minimum number of functions in impl block [1]\n- `rca.impl.nom.total`: Total number of methods in impl block [1]\n\n\n### Cognitive Complexity Metrics for Structs\n\n- `rca.struct.cognitive.average`: The average cognitive complexity of the code within struct definitions [1]\n- `rca.struct.cognitive.max`: The maximum cognitive complexity of the code within struct definitions [1]\n- `rca.struct.cognitive.min`: The minimum cognitive complexity of the code within struct definitions [1]\n- `rca.struct.cognitive.sum`: The sum of cognitive complexity across all functions within struct definitions [1]\n\n### Cyclomatic Complexity Metrics for Structs\n\n- `rca.struct.cyclomatic.average`: The average cyclomatic complexity of the code within struct definitions [1]\n- `rca.struct.cyclomatic.max`: The maximum cyclomatic complexity of the code within struct definitions [1]\n- `rca.struct.cyclomatic.min`: The minimum cyclomatic complexity of the code within struct definitions [1]\n- `rca.struct.cyclomatic.sum`: The sum of cyclomatic complexity across all functions within struct definitions [1]\n\n### Halstead Metrics for Structs\n\n- `rca.struct.halstead.N1`: Halstead's N1 metric for struct definitions [1]\n- `rca.struct.halstead.N2`: Halstead's N2 metric for struct definitions [1]\n- `rca.struct.halstead.bugs`: The estimated number of bugs in struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.difficulty`: The difficulty level of struct definitions calculated using Halstead's metrics [1]\n- `rca.struct.halstead.effort`: The effort required to write struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.estimated_program_length`: The estimated length of struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.length`: The length of struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.level`: The level of struct definitions calculated using Halstead's metrics [1]\n- `rca.struct.halstead.n1`: The number of distinct operators in struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.n2`: The number of distinct operands in struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.purity_ratio`: The purity ratio of struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.time`: The time required to write struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.vocabulary`: The vocabulary of struct definitions using Halstead's metrics [1]\n- `rca.struct.halstead.volume`: The volume of struct definitions using Halstead's metrics [1]\n\n### Line of Code Metrics for Structs\n\n- `rca.struct.loc.blank`: The number of blank lines in struct definitions [1]\n- `rca.struct.loc.blank_average`: The average number of blank lines in struct definitions [1]\n- `rca.struct.loc.blank_max`: The maximum number of blank lines in struct definitions [1]\n- `rca.struct.loc.blank_min`: The minimum number of blank lines in struct definitions [1]\n- `rca.struct.loc.cloc`: The count of lines of code in struct definitions [1]\n- `rca.struct.loc.cloc_average`: The average count of lines of code in struct definitions [1]\n- `rca.struct.loc.cloc_max`: The maximum count of lines of code in struct definitions [1]\n- `rca.struct.loc.cloc_min`: The minimum count of lines of code in struct definitions [1]\n- `rca.struct.loc.lloc`: The logical lines of code in struct definitions [1]\n- `rca.struct.loc.lloc_average`: The average logical lines of code in struct definitions [1]\n- `rca.struct.loc.lloc_max`: The maximum logical lines of code in struct definitions [1]\n- `rca.struct.loc.lloc_min`: The minimum logical lines of code in struct definitions [1]\n- `rca.struct.loc.ploc`: The physical lines of code in struct definitions [1]\n- `rca.struct.loc.ploc_average`: The average physical lines of code in struct definitions [1]\n- `rca.struct.loc.ploc_max`: The maximum physical lines of code in struct definitions [1]\n- `rca.struct.loc.ploc_min`: The minimum physical lines of code in struct definitions [1]\n- `rca.struct.loc.sloc`: The source lines of code in struct definitions [1]\n- `rca.struct.loc.sloc_average`: The average source lines of code in struct definitions [1]\n- `rca.struct.loc.sloc_max`: The maximum source lines of code in struct definitions [1]\n- `rca.struct.loc.sloc_min`: The minimum source lines of code in struct definitions [1]\n\n### Maintainability Index Metrics for Structs\n\n- `rca.struct.mi.mi_original`: Maintainability Index of struct definitions based on the original formula [1]\n- `rca.struct.mi.mi_sei`: Maintainability Index of struct definitions based on the SEI formula [1]\n- `rca.struct.mi.mi_visual_studio`: Maintainability Index of struct definitions based on Visual Studio implementation [1]\n\n### Function Metrics for Structs\n\n- `rca.struct.nargs.average`: Average number of arguments in functions within struct definitions [1]\n- `rca.struct.nargs.average_closures`: Average number of arguments in closures within struct definitions [1]\n- `rca.struct.nargs.average_functions`: Average number of arguments in functions within struct definitions [1]\n- `rca.struct.nargs.closures_max`: Maximum number of arguments in closures within struct definitions [1]\n- `rca.struct.nargs.closures_min`: Minimum number of arguments in closures within struct definitions [1]\n- `rca.struct.nargs.functions_max`: Maximum number of arguments in functions within struct definitions [1]\n- `rca.struct.nargs.functions_min`: Minimum number of arguments in functions within struct definitions [1]\n- `rca.struct.nargs.total`: Total number of arguments in functions within struct definitions [1]\n- `rca.struct.nargs.total_closures`: Total number of arguments in closures within struct definitions [1]\n- `rca.struct.nargs.total_functions`: Total number of arguments in functions within struct definitions [1]\n\n### Exit Metrics for Structs\n\n- `rca.struct.nexits.average`: Average number of exit points in functions within struct definitions [1]\n- `rca.struct.nexits.max`: Maximum number of exit points in functions within struct definitions [1]\n- `rca.struct.nexits.min`: Minimum number of exit points in functions within struct definitions [1]\n- `rca.struct.nexits.sum`: Total number of exit points in functions within struct definitions.\n\n### Method Metrics for Structs\n\n- `rca.struct.nom.average`: Average number of methods within struct definitions [1]\n- `rca.struct.nom.closures`: Number of methods in closures within struct definitions [1]\n- `rca.struct.nom.closures_average`: Average number of methods in closures within struct definitions [1]\n- `rca.struct.nom.closures_max`: Maximum number of methods in closures within struct definitions [1]\n- `rca.struct.nom.closures_min`: Minimum number of methods in closures within struct definitions [1]\n- `rca.struct.nom.functions`: Number of methods in functions within struct definitions [1]\n- `rca.struct.nom.functions_average`: Average number of methods in functions within struct definitions [1]\n- `rca.struct.nom.functions_max`: Maximum number of methods in functions within struct definitions [1]\n- `rca.struct.nom.functions_min`: Minimum number of methods in functions within struct definitions [1]\n- `rca.struct.nom.total`: Total number of methods within struct definitions.\n\n### Cognitive Complexity Metrics for Traits\n\n- `rca.trait.cognitive.average`: The average cognitive complexity of the code within trait a definition [1]\n- `rca.trait.cognitive.max`: The maximum cognitive complexity of the code within trait a definition [1]\n- `rca.trait.cognitive.min`: The minimum cognitive complexity of the code within trait a definition [1]\n- `rca.trait.cognitive.sum`: The sum of cognitive complexity across all functions within a trait definition [1]\n\n### Cyclomatic Complexity Metrics for Traits\n\n- `rca.trait.cyclomatic.average`: The average cyclomatic complexity of the code within trait a definition [1]\n- `rca.trait.cyclomatic.max`: The maximum cyclomatic complexity of the code within a trait definition [1]\n- `rca.trait.cyclomatic.min`: The minimum cyclomatic complexity of the code within a trait definition [1]\n- `rca.trait.cyclomatic.sum`: The sum of cyclomatic complexity across all functions within a trait definition [1]\n\n### Halstead Metrics for Traits\n\n- `rca.trait.halstead.N1`: Halstead's N1 metric for trait definitions [1]\n- `rca.trait.halstead.N2`: Halstead's N2 metric for trait definitions [1]\n- `rca.trait.halstead.bugs`: The estimated number of bugs in trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.difficulty`: The difficulty level of trait definitions calculated using Halstead's metrics [1]\n- `rca.trait.halstead.effort`: The effort required to write trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.estimated_program_length`: The estimated length of trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.length`: The length of trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.level`: The level of trait definitions calculated using Halstead's metrics [1]\n- `rca.trait.halstead.n1`: The number of distinct operators in trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.n2`: The number of distinct operands in trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.purity_ratio`: The purity ratio of trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.time`: The time required to write trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.vocabulary`: The vocabulary of trait definitions using Halstead's metrics [1]\n- `rca.trait.halstead.volume`: The volume of trait definitions using Halstead's metrics [1]\n\n### Line of Code Metrics for Traits\n\n- `rca.trait.loc.blank`: The number of blank lines in trait definitions [1]\n- `rca.trait.loc.blank_average`: The average number of blank lines in trait definitions [1]\n- `rca.trait.loc.blank_max`: The maximum number of blank lines in trait definitions [1]\n- `rca.trait.loc.blank_min`: The minimum number of blank lines in trait definitions [1]\n- `rca.trait.loc.cloc`: The count of lines of code in trait definitions [1]\n- `rca.trait.loc.cloc_average`: The average count of lines of code in trait definitions [1]\n- `rca.trait.loc.cloc_max`: The maximum count of lines of code in trait definitions [1]\n- `rca.trait.loc.cloc_min`: The minimum count of lines of code in trait definitions [1]\n- `rca.trait.loc.lloc`: The logical lines of code in trait definitions [1]\n- `rca.trait.loc.lloc_average`: The average logical lines of code in trait definitions [1]\n- `rca.trait.loc.lloc_max`: The maximum logical lines of code in trait definitions [1]\n- `rca.trait.loc.lloc_min`: The minimum logical lines of code in trait definitions [1]\n- `rca.trait.loc.ploc`: The physical lines of code in trait definitions [1]\n- `rca.trait.loc.ploc_average`: The average physical lines of code in trait definitions [1]\n- `rca.trait.loc.ploc_max`: The maximum physical lines of code in trait definitions [1]\n- `rca.trait.loc.ploc_min`: The minimum physical lines of code in trait definitions [1]\n- `rca.trait.loc.sloc`: The source lines of code in trait definitions [1]\n- `rca.trait.loc.sloc_average`: The average source lines of code in trait definitions [1]\n- `rca.trait.loc.sloc_max`: The maximum source lines of code in trait definitions [1]\n- `rca.trait.loc.sloc_min`: The minimum source lines of code in trait definitions [1]\n\n### Maintainability Index Metrics for Traits\n\n- `rca.trait.mi.mi_original`: Maintainability Index of trait definitions based on the original formula [1]\n- `rca.trait.mi.mi_sei`: Maintainability Index of trait definitions based on the SEI formula [1]\n- `rca.trait.mi.mi_visual_studio`: Maintainability Index of trait definitions based on Visual Studio implementation [1]\n\n### Function Metrics for Traits\n\n- `rca.trait.nargs.average`: Average number of arguments in functions within trait definitions [1]\n- `rca.trait.nargs.average_closures`: Average number of arguments in closures within trait definitions [1]\n- `rca.trait.nargs.average_functions`: Average number of arguments in functions within trait definitions [1]\n- `rca.trait.nargs.closures_max`: Maximum number of arguments in closures within trait definitions [1]\n- `rca.trait.nargs.closures_min`: Minimum number of arguments in closures within trait definitions [1]\n- `rca.trait.nargs.functions_max`: Maximum number of arguments in functions within trait definitions [1]\n- `rca.trait.nargs.functions_min`: Minimum number of arguments in functions within trait definitions [1]\n- `rca.trait.nargs.total`: Total number of arguments in functions within trait definitions [1]\n- `rca.trait.nargs.total_closures`: Total number of arguments in closures within trait definitions [1]\n- `rca.trait.nargs.total_functions`: Total number of arguments in functions within trait definitions [1]\n\n### Exit Metrics for Traits\n\n- `rca.trait.nexits.average`: Average number of exit points in functions within trait definitions [1]\n- `rca.trait.nexits.max`: Maximum number of exit points in functions within trait definitions [1]\n- `rca.trait.nexits.min`: Minimum number of exit points in functions within trait definitions [1]\n- `rca.trait.nexits.sum`: Total number of exit points in functions within trait definitions [1]\n\n### Method Metrics for Traits\n\n- `rca.trait.nom.average`: Average number of methods within trait definitions [1]\n- `rca.trait.nom.closures`: Number of methods in closures within trait definitions [1]\n- `rca.trait.nom.closures_average`: Average number of methods in closures per trait definition [1]\n\n within trait definitions.\n- `rca.trait.nom.closures_max`: Maximum number of methods in closures within trait definitions [1]\n- `rca.trait.nom.closures_min`: Minimum number of methods in closures within trait definitions [1]\n- `rca.trait.nom.functions`: Number of methods in functions within trait definitions [1]\n- `rca.trait.nom.functions_average`: Average number of methods in functions within trait definitions [1]\n- `rca.trait.nom.functions_max`: Maximum number of functions in trait definitions [1]\n- `rca.trait.nom.functions_min`: Minimum number of functions in trait definitions [1]\n- `rca.trait.nom.total`: Total number of methods within trait definitions [1]\n\n### Additional Metrics\n\n- `statement_size`: The size of statements in the code [1]\n- `structs.attrs_count`: Total number of attributes across all structs [1]\n- `structs.field_attr_count`: Total number of attributes across all struct fields [1]\n- `structs.fields_count`: Total number of fields across all structs [1]\n- `structs.public_fields_count`: Total number of public fields across all structs [1]\n- `trait_def.all_fn_count`: Total number of functions within trait definitions [1]\n- `trait_def.assoc_type_count`: Total number of associated types within trait definitions [1]\n- `trait_def.default_fn_count`: Total number of default functions within trait definitions [1]\n- `trait_def.generic_param_count`: Total number of generic parameters within trait definitions [1]\n- `trait_def.supertrait_count`: Total number of supertraits within trait definitions [1]\n\n### Repository metrics\n\n- `repo.commit_count`: Total number of commits in the repository.\n- `repo.forks`: Total number of forks for the repository.\n- `repo.open_issues`: Total number of open issues for the repository.\n- `repo.size`: Size of the repository in kilobytes.\n- `repo.stars`: Total number of stars for the repository.\n- `repo.watchers`: Total number of watchers for the repository.\n- `if_count`: Total number of if statements in the code.\n\n\n### Metric references\n\n[1] These metrics are collected using the [rust-code-analysis](https://mozilla.github.io/rust-code-analysis/index.html)\n\n[2] Campbell, G. Ann, _Cognitive complexity: an overview and evaluation_, 2018\n\n[3] Allen, E.B. and Khoshgoftaar, T.M., _Measuring coupling and cohesion: an information-theory approach_, 1999\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcnick3%2Fifcount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcnick3%2Fifcount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcnick3%2Fifcount/lists"}