Skip to content

Commit 4680609

Browse files
authored
perf: use custom reactive sinks to improve allocations and performance (#4363)
1 parent 719f6e6 commit 4680609

1,362 files changed

Lines changed: 141570 additions & 83759 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 1434 additions & 241 deletions
Large diffs are not rendered by default.

.github/workflows/sonarcloud.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: SonarCloud
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
sonarcloud:
14+
uses: reactiveui/actions-common/.github/workflows/workflow-common-sonarcloud.yml@main
15+
with:
16+
productNamespacePrefix: ReactiveUI
17+
installWorkloads: true
18+
sonarProjectKey: reactiveui_ReactiveUI
19+
sonarOrganization: reactiveui
20+
sonarExclusions: '**/tests/**,**/integrationtests/**,**/benchmarks/**,**/examples/**,**/TestResults/**'
21+
# Shared/Platform fused Rx-replacement observables are compile-linked into every platform assembly and
22+
# only exercisable via platform (WPF/WinForms/MAUI/mobile) tests, so exclude them from coverage like
23+
# generated code. The Shared/ root helpers stay measured (covered by the core test suite).
24+
sonarCoverageExclusions: '**/tests/**,**/integrationtests/**,**/benchmarks/**,**/examples/**,**/*Tests/**,**/*Tests.cs,**/Generated/**,**/Shared/Platform/**'
25+
# CPD (copy/paste detection) exclusions:
26+
# - tests/integrationtests/Benchmarks/examples are non-shipping code. The examples are
27+
# demo apps that deliberately parallel each other (each sample reimplements the same
28+
# view-model/driver shapes so it reads standalone), so cross-sample duplication is
29+
# expected and not worth de-duplicating into a shared library.
30+
# - WhenAny{Value,Change}Sink.Arity{N}.cs, WhenAnyMixin.Arity{N}.cs and
31+
# WhenAnyObservableMixin.Arity{N}.cs are template-style arity-specific files: the
32+
# residual duplication is the irreducible per-arity typed surface (N typed fields,
33+
# N constructor params, N switch arms). Compressing further would need source
34+
# generators or boxing-based erasure; suppressing CPD here keeps the metric honest
35+
# while every other Sonar rule still runs on them. Sonar path matchers only support
36+
# *, **, ? — use ? twice to cover 1- and 2-digit arities.
37+
sonarCpdExclusions: '**/tests/**,**/integrationtests/**,**/benchmarks/**,**/examples/**,**/*.Arity?.cs,**/*.Arity??.cs'
38+
sonarTestExclusions: '**/tests/**,**/integrationtests/**,**/benchmarks/**'
39+
testTimeout: '15m'
40+
secrets:
41+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)