Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
580d248
Plan support for abstract clock abstractions
Copilot May 8, 2026
32f6e33
Add TimeProvider code fix option for clock diagnostics
Copilot May 8, 2026
8c98da4
Remove unstable TimeProvider code-fix test case
Copilot May 8, 2026
7846ce2
Revert "Plan support for abstract clock abstractions"
Copilot May 8, 2026
f904027
Restore clock code-fix test file to baseline
Copilot May 8, 2026
1901f4a
Harden TimeProvider code-fix member insertion and fallback
Copilot May 8, 2026
1ae4452
Use syntax-based TimeProvider type checks in code fix
Copilot May 8, 2026
c3d9dbd
Address TimeProvider code-fix review feedback
Copilot May 8, 2026
8426a78
Refine TimeProvider assignment checks for constructors
Copilot May 8, 2026
30ee563
Polish assignment collision handling and test naming
Copilot May 8, 2026
313098f
Handle constructor chaining edge cases in TimeProvider code fix
Copilot May 8, 2026
637fb90
Refine TimeProvider parameter-name helper implementation
Copilot May 8, 2026
0af7bfa
Avoid unnecessary this-qualification in TimeProvider assignment
Copilot May 8, 2026
75ed2f8
Finalize checklist after TimeProvider assignment qualifier fix
Copilot May 8, 2026
3d4b766
Remove accidental tracked obj artifact updates
Copilot May 8, 2026
afcbe7a
Harden TimeProvider constructor wiring for initializer and assignment…
Copilot May 9, 2026
90906b4
Finalize checklist after latest TimeProvider review fixes
Copilot May 9, 2026
58a4df1
Remove accidental tracked obj updates from checklist commit
Copilot May 9, 2026
d2b8b98
Handle TimeProvider type compatibility and constructor assignment ins…
Copilot May 9, 2026
fdf0806
Insert TimeProvider assignment before terminal constructor statements
Copilot May 9, 2026
22e6ea6
Clarify terminal-statement insertion logic for TimeProvider assignment
Copilot May 9, 2026
382bb39
Fix derived TimeProvider parameter typing and broaden field-name coll…
Copilot May 11, 2026
9b2b68e
Finalize checklist for latest TimeProvider review thread
Copilot May 11, 2026
430e85f
Remove accidental tracked obj artifact updates
Copilot May 11, 2026
6d6550c
Fix constructor assignment insertion and parameter name collisions fo…
Copilot May 11, 2026
449159b
Handle optional constructor parameters in TimeProvider injection and …
Copilot May 11, 2026
ac5f389
Refine optional-parameter insertion helper readability
Copilot May 11, 2026
14ed604
Rename insertion helper variable for clarity
Copilot May 11, 2026
758d5aa
Preserve non-trivial TimeProvider assignment expressions in construct…
Copilot May 11, 2026
42760c1
Finalize checklist for preserving non-trivial TimeProvider assignments
Copilot May 11, 2026
c3385d4
Revert accidental tracked obj artifact updates
Copilot May 11, 2026
aef2b28
Preserve DateTime.Now Kind.Local in TimeProvider rewrite
Copilot May 11, 2026
7c69536
Handle static context and fully-qualified DateTime.Now TimeProvider r…
Copilot May 12, 2026
02c7586
Finalize latest TimeProvider review-thread fixes
Copilot May 12, 2026
a488d89
Revert "Finalize latest TimeProvider review-thread fixes"
Copilot May 12, 2026
bef00e7
Fix static-context detection and this-initializer argument placement …
Copilot May 12, 2026
5993e40
Keep global System qualifiers in DateTime.Now rewrite generation
Copilot May 12, 2026
873a62c
Simplify this-initializer argument insertion fallback logic
Copilot May 12, 2026
a0b19b8
Handle static ctors partial-field lookup and named this-arguments in …
Copilot May 12, 2026
5bd4202
Refine partial-field type formatting and test expectations for TimePr…
Copilot May 12, 2026
af898cb
Preserve global TimeProvider syntax for System fields in partial fiel…
Copilot May 12, 2026
7043551
Handle static field reuse and partial-constructor updates in TimeProv…
Copilot May 12, 2026
a1f667b
Simplify instance constructor symbol collection in TimeProvider fix
Copilot May 12, 2026
d7f3c6d
Rename partial constructor-chain regression test for clarity
Copilot May 12, 2026
fb8d46a
Guard TimeProvider code fix against unsafe initializer and cross-docu…
Copilot May 12, 2026
5b37c57
Clarify readonly field safety after constructor-scope guard in TimePr…
Copilot May 12, 2026
bd09760
Clarify constructor-guard comment in TimeProvider field insertion
Copilot May 12, 2026
0057839
Tighten code-fix offering checks and initializer named-argument threa…
Copilot May 12, 2026
2658cdf
Make TimeProvider offering conservative when class symbol is unavailable
Copilot May 12, 2026
b369fb3
Use System-qualified DateTime.Now rewrite for cleaner TimeProvider fixes
Copilot May 12, 2026
4dc0abf
Fix derived TimeProvider this-initializer parameter targeting
Copilot May 12, 2026
a2f37ce
Fix duplicate this-arg insertion and non-identifier assignment threading
Copilot May 12, 2026
d848c5f
Fix named initializer positional shortcut in this-constructor threading
Copilot May 12, 2026
fad4f31
Suppress IClock code fix in unsafe initializer contexts
Copilot May 12, 2026
24f8046
Rewrite existing this(...) TimeProvider args to injected parameter
Copilot May 12, 2026
3275b85
Adjust analyzer wording and unsafe-context helper naming
Copilot May 12, 2026
a28ec95
Revert accidental tracked build artifact changes
Copilot May 12, 2026
eb83d61
Potential fix for pull request finding
JerrettDavis May 12, 2026
c26ecfd
Finalize follow-up for latest review thread
Copilot May 12, 2026
66a69c7
Revert accidental tracked build artifact changes
Copilot May 12, 2026
1d09277
Potential fix for pull request finding
JerrettDavis May 12, 2026
71621cc
Potential fix for pull request finding
JerrettDavis May 13, 2026
c5ab8b0
Use named this-arg when optional params are omitted before TimeProvider
Copilot May 13, 2026
1940067
Finalize validation and comment response for optional-arg this initia…
Copilot May 13, 2026
d53344c
Remove accidental obj artifact changes from PR
Copilot May 13, 2026
2a8847f
Potential fix for pull request finding
JerrettDavis May 13, 2026
51f73dd
Potential fix for pull request finding
JerrettDavis May 13, 2026
c401c81
Potential fix for pull request finding
JerrettDavis May 13, 2026
18a321a
Make partial TimeProvider test inputs definitely assign readonly fields
Copilot May 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Inshiminator is a .NET-first developer toolkit that uses **Roslyn analyzers, inc
### 🚀 Key Features

- **Detect:** Automatically finds direct usage of `DateTime.UtcNow`, `Guid.NewGuid()`, `File.ReadAllText`, and more.
- **Generate:** Emits strongly typed abstractions (`IClock`, `IGuidGenerator`) and implementations (`SystemClock`, `SystemGuidGenerator`) at compile time.
- **Generate:** Emits strongly typed abstractions (`IClock`, `IGuidGenerator`) and implementations (`SystemClock`, `SystemGuidGenerator`) at compile time, while also supporting framework abstractions like `TimeProvider`.
- **Guide:** Provides IDE code fixes to automatically inject shims into your classes.
- **Govern:** Enforce boundary rules through analyzer severity and baselines.

Expand Down
2 changes: 1 addition & 1 deletion src/Inshiminator.Analyzers/ClockAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ClockAnalyzer : DiagnosticAnalyzer
public const string DiagnosticId = "INSHIM001";

private static readonly LocalizableString Title = "Direct system clock usage detected";
private static readonly LocalizableString MessageFormat = "Use IClock instead of {0} so time can be controlled in tests";
private static readonly LocalizableString MessageFormat = "Use IClock (or TimeProvider when available) instead of {0} so time can be controlled in tests";
private static readonly LocalizableString Description = "Direct usage of system clock makes code difficult to test.";
private const string Category = "Design";

Expand Down
Loading
Loading