{"id":28720116,"url":"https://github.com/funfair-tech/funfair-server-code-analysis","last_synced_at":"2026-02-27T21:21:29.050Z","repository":{"id":39484752,"uuid":"228499997","full_name":"funfair-tech/funfair-server-code-analysis","owner":"funfair-tech","description":"Additional code analysis rules that all FunFair C# code needs to abide by","archived":false,"fork":false,"pushed_at":"2025-08-19T16:07:04.000Z","size":5359,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-19T16:38:25.189Z","etag":null,"topics":["code-analysis","code-analyzer","code-quality","roslyn-analyzers"],"latest_commit_sha":null,"homepage":"https://www.funfair.io/","language":"C#","has_issues":false,"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/funfair-tech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-12-17T00:27:33.000Z","updated_at":"2025-08-19T16:03:04.000Z","dependencies_parsed_at":"2023-09-24T13:26:07.751Z","dependency_job_id":"d25d5b3a-6707-4f4c-9e92-69d7307d07f6","html_url":"https://github.com/funfair-tech/funfair-server-code-analysis","commit_stats":null,"previous_names":[],"tags_count":2417,"template":false,"template_full_name":"funfair-tech/funfair-server-template","purl":"pkg:github/funfair-tech/funfair-server-code-analysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funfair-tech%2Ffunfair-server-code-analysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funfair-tech%2Ffunfair-server-code-analysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funfair-tech%2Ffunfair-server-code-analysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funfair-tech%2Ffunfair-server-code-analysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funfair-tech","download_url":"https://codeload.github.com/funfair-tech/funfair-server-code-analysis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funfair-tech%2Ffunfair-server-code-analysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271189685,"owners_count":24715143,"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-08-19T02:00:09.176Z","response_time":63,"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","code-analyzer","code-quality","roslyn-analyzers"],"created_at":"2025-06-15T06:06:58.575Z","updated_at":"2026-02-27T21:21:29.044Z","avatar_url":"https://github.com/funfair-tech.png","language":"C#","readme":"# funfair-server-code-analysis\n\nStatic Code analysis Repo for FunFair Server dotnet projects.\n\n## Build Status\n\n| Branch  | Status                                                                                                                                                                                                                                                                |\n|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| main    | [![Build: Pre-Release](https://github.com/funfair-tech/funfair-server-code-analysis/actions/workflows/build-and-publish-pre-release.yml/badge.svg)](https://github.com/funfair-tech/funfair-server-code-analysis/actions/workflows/build-and-publish-pre-release.yml) |\n| release | [![Build: Release](https://github.com/funfair-tech/funfair-server-code-analysis/actions/workflows/build-and-publish-release.yml/badge.svg)](https://github.com/funfair-tech/funfair-server-code-analysis/actions/workflows/build-and-publish-release.yml)             |\n\n## Checks\n\n| Code    | Meaning                                                                                                                                        |\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| FFS0001 | Avoid using ``DateTime.Now`` - Use ``IDateTimeSource.UtcNow()``                                                                                |\n| FFS0002 | Avoid using ``DateTime.UtcNow`` - Use ``IDateTimeSource.UtcNow()``                                                                             |\n| FFS0003 | Avoid using ``DateTime.Today`` - Use ``IDateTimeSource.UtcNow().Date``                                                                         |\n| FFS0004 | Avoid using ``DateTimeOffset.Now`` - Use ``IDateTimeSource.UtcNow()``                                                                          |\n| FFS0005 | Avoid using ``DateTimeOffset.UtcNow`` - Use ``IDateTimeSource.UtcNow()``                                                                       |\n| FFS0006 | Avoid using arbitrary SQL for updates                                                                                                          |\n| FFS0007 | Avoid using arbitrary SQL for queries                                                                                                          |\n| FFS0008 | Do not disable warnings                                                                                                                        |\n| FFS0009 | Do not use ``Assert.True`` without specifying a message                                                                                        |\n| FFS0010 | Do not use ``Assert.False`` without specifying a message                                                                                       |\n| FFS0011 | Make structs ``readonly``                                                                                                                      |\n| FFS0012 | Classes should be ``static``, ``sealed`` or ``abstract``                                                                                       |\n| FFS0013 | Test Classes should be  ``sealed`` or ``abstract`` and derived from ``TestBase``                                                               |\n| FFS0014 | Do not use ``JsonSerialiser`` without specifying ``JsonOptions``                                                                               |\n| FFS0015 | Do not use ``JsonDeserialiser`` without specifying ``JsonOptions``                                                                             |\n| FFS0016 | Pass parameter name to ``ArgumentExceptions``                                                                                                  |\n| FFS0017 | Pass inner exception to exceptions thrown in catch block                                                                                       |\n| FFS0018 | Don't use NSubstitute's Received() without specifying the number of calls                                                                      |\n| FFS0019 | ``ILogger`` parameters should be called logger                                                                                                 |\n| FFS0020 | Parameters should be in a specified order                                                                                                      |\n| FFS0021 | Don't use NSubstitute's ``Received(0)`` - use ``DidNotReceive()`` instead                                                                      |\n| FFS0022 | Don't configure nullable in code - should be a project level.                                                                                  |\n| FFS0023 | Logger parameters on base classes should be ``ILogger`` not ``ILogger\u003cClassName\u003e``                                                             |\n| FFS0024 | Logger parameters on leaf classes should be ``ILogger\u003cClassName\u003e`` not ``ILogger``                                                             |\n| FFS0025 | Mismatch of generic type                                                                                                                       |\n| FFS0026 | Do not read IPAddress from Connection - use an abstraction                                                                                     |\n| FFS0027 | ``SuppressMessage`` must specify a justification                                                                                               |\n| FFS0028 | Records should be ``sealed``                                                                                                                   |\n| FFS0029 | Classes derived from ``MockBase\u003cT\u003e`` should be ``internal``                                                                                    |\n| FFS0030 | Classes derived from ``MockBase\u003cT\u003e`` should be ``sealed``                                                                                      |\n| FFS0031 | Avoid using ``System.Collections.Concurrent.ConcurrentDictionary\u003c,\u003e`` - Use ``NonBlocking.ConcurrentDictionary\u003c,\u003e``                            |\n| FFS0032 | Avoid using ``NonBlocing.ConcurrentDictionary\u003c,\u003e.AddOrUpdate`` - Use ``FunFair.Common.Extensions.ConcurrentDictionaryExtensions.AddOrUpdate``  |\n| FFS0033 | Avoid using ``NonBlocing.ConcurrentDictionary\u003c,\u003e.GetOrAdd`` - Use ``FunFair.Common.Extensions.ConcurrentDictionaryExtensions.GetOrAdd``        |\n| FFS0034 | Avoid using ``Microsoft.Extensions.Configuration.ConfigurationBuilder.AddJsonFile`` with reload set to true                                    |\n| FFS0035 | Checks that test classes do not define mutable fields                                                                                          |\n| FFS0036 | Checks that test classes do not define mutable properties                                                                                      |\n| FFS0037 | Checks that ``Guid.Parse`` is not used and that ``new Guid`` or ``Guid.TryParse`` is used instead                                              |\n| FFS0038 | Records should have ``DebuggerDisplay`` attribute on them.                                                                                     |\n| FFS0039 | Only one type name should be defined per file. Note ``class T`` and ``class T\u003cT1\u003e`` are considered to be one type as they share the same name. |\n| FFS0040 | Type should be in a file with the same name as the type.                                                                                       |\n| FFS0041 | Do not use System.Console in test assemblies.                                                                                                  |\n| FFS0042 | Do not have TODO's in ``SuppressMessage`` justifications.                                                                                      |\n| FFS0043 | Do not use ``StringComparer.InvariantCulture`` use ``StringComparer.Ordinal`` instead.                                                         |\n| FFS0044 | Do not use ``StringComparer.InvariantCultureIgnoreCase`` use ``StringComparer.OrdinalIgnoreCase`` instead.                                     |\n| FFS0045 | Do not use ``StringCompaison.InvariantCulture`` use ``StringCompaison.Ordinal`` instead.                                                       |\n| FFS0046 | Do not use ``StringCompaison.InvariantCultureIgnoreCase`` use ``StringCompaison.OrdinalIgnoreCase`` instead.                                   |\n| FFS0047 | Do not use ``StringCompaison.CurrentCulture`` use ``StringCompaison.Ordinal`` instead.                                                         |\n| FFS0048 | Do not use ``StringCompaison.CurrentCultureIgnoreCase`` use ``StringCompaison.OrdinalIgnoreCase`` instead.                                     |\n\n## Changelog\n\nView [changelog](CHANGELOG.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunfair-tech%2Ffunfair-server-code-analysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunfair-tech%2Ffunfair-server-code-analysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunfair-tech%2Ffunfair-server-code-analysis/lists"}