{"id":22969154,"url":"https://github.com/kyosu-1/boolcmp","last_synced_at":"2025-04-02T05:26:56.303Z","repository":{"id":143371940,"uuid":"614602372","full_name":"kyosu-1/boolcmp","owner":"kyosu-1","description":"static analysis tool for Go that detects variables with bool values that use comparison operators.","archived":false,"fork":false,"pushed_at":"2023-03-16T01:03:16.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T20:14:12.858Z","etag":null,"topics":["go","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"Go","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/kyosu-1.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}},"created_at":"2023-03-15T23:39:20.000Z","updated_at":"2023-03-17T04:24:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5a7e879-1a89-40b8-b820-c99b02d26dd2","html_url":"https://github.com/kyosu-1/boolcmp","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/kyosu-1%2Fboolcmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosu-1%2Fboolcmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosu-1%2Fboolcmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosu-1%2Fboolcmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyosu-1","download_url":"https://codeload.github.com/kyosu-1/boolcmp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246761564,"owners_count":20829485,"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":["go","static-analysis"],"created_at":"2024-12-14T21:32:36.311Z","updated_at":"2025-04-02T05:26:56.279Z","avatar_url":"https://github.com/kyosu-1.png","language":"Go","readme":"# boolcmp\n\nThe boolcmp tool is a static analysis tool for Go that detects variables with bool values that use comparison operators, and reports them as potentially simplifiable. \n\n# install\n\n```\n$ go install github.com/kyosu-1/boolcmp\n```\n\n# Usage\n\n```\n$ go vet -vettool=$(which boolcmp) path/to/your/package\n```\n\n# Example\n\nConsider the following Go code:\n\n```go\npackage main\n\nfunc main() {\n    var a bool = true\n    if a == true {\n        // do something\n    }\n}\n```\n\nThe boolcmp tool will detect the comparison `a == true` and report it as a warning. The output might look something like this: \n\n```\nmain.go:5:10: bool value used in comparison\n```\n\nThe warning indicates that the comparison `a == true` can be simplified to just a. This can make the code more concise and easier to read, since the comparison with `true` is unnecessary.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyosu-1%2Fboolcmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyosu-1%2Fboolcmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyosu-1%2Fboolcmp/lists"}