{"id":17081985,"url":"https://github.com/studyzy/go-strchecker","last_synced_at":"2025-04-12T21:06:53.318Z","repository":{"id":44460991,"uuid":"502015703","full_name":"studyzy/go-strchecker","owner":"studyzy","description":"golang code string checker","archived":false,"fork":false,"pushed_at":"2022-06-13T13:51:13.000Z","size":16,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T21:06:47.451Z","etag":null,"topics":["go","golang","lint","string"],"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/studyzy.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":"2022-06-10T11:21:16.000Z","updated_at":"2022-07-11T09:33:11.000Z","dependencies_parsed_at":"2022-09-26T21:20:20.103Z","dependency_job_id":null,"html_url":"https://github.com/studyzy/go-strchecker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studyzy%2Fgo-strchecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studyzy%2Fgo-strchecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studyzy%2Fgo-strchecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/studyzy%2Fgo-strchecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/studyzy","download_url":"https://codeload.github.com/studyzy/go-strchecker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631680,"owners_count":21136562,"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","golang","lint","string"],"created_at":"2024-10-14T12:58:29.732Z","updated_at":"2025-04-12T21:06:53.293Z","avatar_url":"https://github.com/studyzy.png","language":"Go","readme":"# go-strchecker\ngolang code string checker [【中文】](README_CN.md)\n\nstrchecker can scan golang source code, and find all strings that matched \"invalid-str\" regular expression. \nBy default, strchecker can find all not ASCII code string.\n# Get Started\n```bash\ngo install github.com/studyzy/go-strchecker/cmd/strchecker@latest\nstrchecker ./...\n```\n# Usage\n```bash\nstrchecker ARGS \u003cdirectory\u003e [\u003cdirectory\u003e...]\n\nFlags:\n\n  -skip-file         exclude files matching the given regular expression\n  -ignore-tests      exclude tests from the search (default: true)\n  -output            output formatting (text or json)\n  -set-exit-status   Set exit status to 2 if any issues are found\n  -invalid-str       Set invalid regular expression (default: ASCII only, regular expression: [^\\x00-\\xff])\n```\n\n# Examples\n```bash\nstrchecker ./...\nstrchecker -skip-file \"_mock.go\" $GOPATH/src/github.com/studyzy/iocgo\nstrchecker -invalid-str \"[，。？！]\" -output json $GOPATH/src/github.com/studyzy/iocgo\nstrchecker -invalid-type=1 ./testdata/...\n```\n# Result\n```bash\n0 testdata/main.go:10:30 has invalid string: \"not found！\"\n1 testdata/main.go:12:17 has invalid string: \"no，data！\"\n2 testdata/main.go:15:14 has invalid string: \"Hello，World！\"\n3 testdata/main.go:16:12 has invalid string: \"Current time：\"\n4 testdata/main.go:19:15 has invalid string: \"한국어\"\n5 testdata/main.go:20:15 has invalid string: \"にほんご\"\n6 testdata/main.go:22:14 has invalid string: \":) 😁😁😁\"\n7 testdata/call.go:9:60 has invalid string: \"！\"\n8 testdata/call.go:10:11 has invalid string: \"a！b\"\n9 testdata/call.go:11:5 has invalid string: \"aa！\"\n10 testdata/call.go:12:40 has invalid string: \"bb！\"\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudyzy%2Fgo-strchecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstudyzy%2Fgo-strchecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstudyzy%2Fgo-strchecker/lists"}