{"id":17649257,"url":"https://github.com/ormanli/mixingcheck","last_synced_at":"2025-05-07T06:21:38.133Z","repository":{"id":57595749,"uuid":"279113791","full_name":"ormanli/mixingcheck","owner":"ormanli","description":"mixingcheck is a static analyzer to check forbidden structs and method calls.","archived":false,"fork":false,"pushed_at":"2023-02-23T11:06:23.000Z","size":79,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-31T07:11:15.294Z","etag":null,"topics":["cli","go","golang","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ormanli.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-12T17:26:11.000Z","updated_at":"2024-07-06T02:53:21.000Z","dependencies_parsed_at":"2024-06-20T09:22:45.805Z","dependency_job_id":"1bfc8d6c-ad6a-4192-b86e-a64eac1937c0","html_url":"https://github.com/ormanli/mixingcheck","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ormanli%2Fmixingcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ormanli%2Fmixingcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ormanli%2Fmixingcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ormanli%2Fmixingcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ormanli","download_url":"https://codeload.github.com/ormanli/mixingcheck/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252825097,"owners_count":21809893,"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":["cli","go","golang","static-analysis"],"created_at":"2024-10-23T11:25:13.218Z","updated_at":"2025-05-07T06:21:38.106Z","avatar_url":"https://github.com/ormanli.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mixingcheck\n\nmixingcheck is a static analyzer to check forbidden structs and method calls.\n\n## Installation\n\nExecute:\n\n```bash\n$ go get github.com/ormanli/mixingcheck\n```\n\nOr using [Homebrew 🍺](https://brew.sh)\n\n```bash\nbrew tap ormanli/mixingcheck https://github.com/ormanli/mixingcheck\nbrew install mixingcheck\n```\n\nOr download from [Releases](https://github.com/ormanli/mixingcheck/releases) page.\n\n## How to use\n\nAdd `.mixingcheck.yaml` to your project.\n\n```yaml\ngithub.com/ormanli/mixingcheck: #1\n  rules:\n    - package: #2\n        value: github.com/spf13/viper\n      name:\n        value: NewWithOptions\n      type: call #3\n    - package:\n        value: github.com/ormanli/mixingcheck/internal/config\n      name:\n        value: Packages\n      type: struct\ngithub.com/ormanli/mixingcheck/internal: #4\n  ignore_parent_rules: true #5\n  rules:\n    - package:\n        value: regexp\n      name:\n        regex: true #6\n        value: .*\n      type: struct\n```\n1. Name of the package you want to execute rules.\n2. The package that contains struct or function you want to check for rule match. \n3. Type is either struct or call.\n4. It is possible to define additional rules for child packages.\n5. If a is true, parent packages rules ignored.\n6. If regex is true, value can be a regular expression.\n\n\nRun mixingcheck, if there is any error it won't return zero.\n```bash\n$ mixingcheck .\nUsing config file: ~/ormanli/git/mixingcheck/.mixingcheck.yaml\n~/ormanli/git/mixingcheck/main.go:13:19: hit struct rule github.com/ormanli/mixingcheck/internal/config.Packages\n~/ormanli/git/mixingcheck/main.go:26:8: hit struct rule github.com/ormanli/mixingcheck/internal/config.Packages\n~/ormanli/git/mixingcheck/main.go:14:7: hit call rule github.com/spf13/viper.NewWithOptions\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Formanli%2Fmixingcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Formanli%2Fmixingcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Formanli%2Fmixingcheck/lists"}