{"id":29622361,"url":"https://github.com/bdrupieski/swiftersharp","last_synced_at":"2026-05-18T10:36:16.479Z","repository":{"id":75155560,"uuid":"139282479","full_name":"bdrupieski/SwifterSharp","owner":"bdrupieski","description":"Make C# more like Swift","archived":false,"fork":false,"pushed_at":"2018-07-04T12:58:52.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T07:38:17.900Z","etag":null,"topics":["code-analysis","csharp","roslyn-analyzer","swift"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/bdrupieski.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,"zenodo":null}},"created_at":"2018-06-30T21:49:08.000Z","updated_at":"2023-07-18T04:34:27.000Z","dependencies_parsed_at":"2023-02-24T13:30:58.160Z","dependency_job_id":null,"html_url":"https://github.com/bdrupieski/SwifterSharp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bdrupieski/SwifterSharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdrupieski%2FSwifterSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdrupieski%2FSwifterSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdrupieski%2FSwifterSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdrupieski%2FSwifterSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdrupieski","download_url":"https://codeload.github.com/bdrupieski/SwifterSharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdrupieski%2FSwifterSharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003723,"owners_count":26083610,"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-10T02:00:06.843Z","response_time":62,"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":["code-analysis","csharp","roslyn-analyzer","swift"],"created_at":"2025-07-21T04:08:46.895Z","updated_at":"2025-10-10T11:04:22.103Z","avatar_url":"https://github.com/bdrupieski.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwifterSharp\n\nMake C# more like Swift.\n\n\u003ca href=\"https://www.nuget.org/packages/SwifterSharp\"\u003e\u003cimg src=\"https://img.shields.io/nuget/v/SwifterSharp.svg?style=flat\"\u003e\u003c/a\u003e\n\n## Summary\n\nThis project is a collection of C# code analyzers that make C# act \nmore like Swift. Right now it's a collection of one.\n\nPull requests are welcome.\n\n## Why do this?\n\nA coworker showed me in Swift you can _require_ named arguments \nwhen calling a method. In C# these are optional except in a few\ncircumstances. \n\nThis is a feature I wish C# had. There are some situations when I \nwish I could require callers to explicitly name all arguments, like\nto try to prevent transposed arguments or to make transposed\narguments easier to identify. This project is my attempt to add\nthis feature to C# and make it work more like Swift.\n\nMaybe I'll add more features if I'm further proselytized.\n\n## Analyzers\n\n### ForceNamedArguments\n\nIf you add the attribute `ForceNamedArguments` to a method, then\nall callers will be forced to explicitly name all arguments when\ncalling that method. By default not naming all arguments will\nresult in a compiler error.\n\nFor example:\n\n```csharp\n[ForceNamedArguments]\npublic static void Work(int x, int y, int z)\n{\n    // some work\n}\n```\n\nWithout all arguments named:\n\n![Force Named Arguments Broken](images/ForceNamedArguments-Broken.png)\n\nWith all arguments named:\n\n![Force Named Arguments Fixed](images/ForceNamedArguments-Fixed.png)\n\nThere's currently no code fix for this error in this package.\nAdditionally, this attribute currently only targets methods. It could\nconceivably also target individual method parameters, selectively\nrequiring some but not all arguments to be named.\n\n## Configuring Analyzers\n\nAnalyzer rule severity can be changed by right-clicking the analyzer in\nthe solution explorer in Visual Studio. For example, to change the\nForceNamedArguments analyzer from its default, an error, to a warning:\n\n![Change Analyzer Severity](images/ChangeAnalyzerSeverity.png)\n\nIf you're not using Visual Studio, since you don't need to in today's\ncross-platform world, you can also add a ruleset to your project\nor solution and add entries to change SwifterSharp rule severities:\n\n```xml\n\u003cRules AnalyzerId=\"SwifterSharp.Analyzers\" RuleNamespace=\"SwifterSharp.Analyzers\"\u003e\n  \u003cRule Id=\"SwifterSharp1000\" Action=\"Warning\" /\u003e\n\u003c/Rules\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdrupieski%2Fswiftersharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdrupieski%2Fswiftersharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdrupieski%2Fswiftersharp/lists"}