{"id":16687487,"url":"https://github.com/warrenbuckley/umbraco.analyzers","last_synced_at":"2026-05-22T17:32:06.177Z","repository":{"id":139472192,"uuid":"150747336","full_name":"warrenbuckley/Umbraco.Analyzers","owner":"warrenbuckley","description":"Roslyn Analyzers and CodeFixes to help guide users building websites with Umbraco","archived":false,"fork":false,"pushed_at":"2019-11-05T19:35:33.000Z","size":32,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-28T04:25:32.555Z","etag":null,"topics":["csharp","roslyn","roslyn-analyzer","roslyn-codefix","umbraco","umbraco-cms"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/warrenbuckley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"warrenbuckley","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-09-28T13:48:25.000Z","updated_at":"2019-11-05T19:35:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"dfde8de2-4aee-4a04-86f8-64b0a32ff1a8","html_url":"https://github.com/warrenbuckley/Umbraco.Analyzers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/warrenbuckley/Umbraco.Analyzers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenbuckley%2FUmbraco.Analyzers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenbuckley%2FUmbraco.Analyzers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenbuckley%2FUmbraco.Analyzers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenbuckley%2FUmbraco.Analyzers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warrenbuckley","download_url":"https://codeload.github.com/warrenbuckley/Umbraco.Analyzers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warrenbuckley%2FUmbraco.Analyzers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33356813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"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":["csharp","roslyn","roslyn-analyzer","roslyn-codefix","umbraco","umbraco-cms"],"created_at":"2024-10-12T15:09:15.618Z","updated_at":"2026-05-22T17:32:06.169Z","avatar_url":"https://github.com/warrenbuckley.png","language":"C#","funding_links":["https://github.com/sponsors/warrenbuckley"],"categories":[],"sub_categories":[],"readme":"# Umbraco Analyzers\nRoslyn Analyzers and CodeFixes to help guide users building websites with Umbraco inside the Visual Studio IDE\n\n## Analyzers\n* **Umb001** - `SurfaceController` class name is not suffixed with Controller\n* **Umb002** - `RenderMvcController` class name is not suffixed with Controller\n* **Umb003** - Various API Controller's `UmbracoApiController`,  `UmbracoAuthorizedApiController`, `UmbracoAuthorizedJsonController` class name is not suffixed with Controller\n\n## Fixes\n* Adds **Controller** Suffix to classes that inherit from classes that would need the class name to have controller suffixed due to Umbraco default routing based on general MVC naming conventions, used by error codes Umb001, Umb002 \u0026 Umb003\n\n## Ideas to implement\n- [ ] Avoid useage of Singlton access of UmbracoContext or ApplicationContext - especially when it is in a base class\n- [ ] If GetAncestors() chained with GetDescendants() - throw a Warning. ARE YOU SURE? *Can we monitor RAZOR files?*\n- [ ] Do not assign umbracoHelper to a private static - it's Request based \u0026 should not be stored into Application lifecycle\n```\n//EXAMPLES OF HOW NOT TO USE - NOT SURE WE CAN CODE FIX THIS THOUGH?\nprivate static _umbracoHelper = new UmbracoHelper(UmbracoContext.Current);\n\nprivate static _umbracoContext = UmbracoContext.Current;\n\n// MembershipHelper is also a request scoped instance - it relies either on an UmbracoContext or an HttpContext\nprivate static _membershipHelper = new MembershipHelper(UmbracoContext.Current);\n\nprivate static _request = HttpContext.Current.Request;\n```\n- [ ] API Service access in views (May only be able to map certain method calls to UmbracoHelper calls)\n```\n// Services access in your views :(\nvar dontDoThis = ApplicationContext.Services.ContentService.GetById(123);\n\n// Content cache access in your views :)\nvar doThis = Umbraco.TypedContent(123);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarrenbuckley%2Fumbraco.analyzers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarrenbuckley%2Fumbraco.analyzers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarrenbuckley%2Fumbraco.analyzers/lists"}