{"id":15490452,"url":"https://github.com/qawatake/fsel","last_synced_at":"2025-03-28T16:27:42.675Z","repository":{"id":206810853,"uuid":"717655471","full_name":"qawatake/fsel","owner":"qawatake","description":"Linter: fsel flags field access with unverified nil errors","archived":false,"fork":false,"pushed_at":"2024-05-22T14:00:23.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T15:27:44.918Z","etag":null,"topics":["go","golang","linter","staticanalysis"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/qawatake/fsel","language":"Go","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/qawatake.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":"2023-11-12T06:04:17.000Z","updated_at":"2024-05-22T15:27:47.161Z","dependencies_parsed_at":null,"dependency_job_id":"359a2c2e-b76b-4063-b96b-a62adc6df44b","html_url":"https://github.com/qawatake/fsel","commit_stats":null,"previous_names":["qawatake/fsel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffsel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffsel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffsel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qawatake%2Ffsel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qawatake","download_url":"https://codeload.github.com/qawatake/fsel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246061797,"owners_count":20717505,"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","linter","staticanalysis"],"created_at":"2024-10-02T07:21:25.966Z","updated_at":"2025-03-28T16:27:42.654Z","avatar_url":"https://github.com/qawatake.png","language":"Go","readme":"# fsel\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/qawatake/fsel.svg)](https://pkg.go.dev/github.com/qawatake/fsel)\n[![test](https://github.com/qawatake/fsel/actions/workflows/test.yaml/badge.svg)](https://github.com/qawatake/fsel/actions/workflows/test.yaml)\n\nLinter: `fsel` flags field access with unverified nil errors.\n\n```go\nfunc bad() error {\n\ts, err := doSomething()\n\tfmt.Println(s.X) // \u003c- field address without checking nilness of err\n\treturn err\n}\n\nfunc good() error {\n\ts, err := doSomething()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfmt.Println(s.X) // ok because err is definitely nil\n\treturn nil\n}\n\nfunc doSomething() (*S, error) {\n\treturn nil, errors.New(\"error\")\n}\n\ntype S struct {\n\tX int\n}\n```\n\nYou can try an example by running `make run.example`.\n\n## How to use\n\n```sh\ngo install github.com/qawatake/fsel/cmd/fsel@latest\nfsel ./...\n```\n\n## False Positives\n\nTo ignore a false positive, add a comment `//lint:ignore fsel reason` to the line.\n\n```go\nfunc f() error {\n\ts, err := doSomething()\n\tif isNotNil(err) {\n\t\treturn err\n\t}\n\tfmt.Println(s.X) //lint:ignore fsel reason\n\treturn nil\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqawatake%2Ffsel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqawatake%2Ffsel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqawatake%2Ffsel/lists"}