Files
Terminal.Gui/.gitignore
Tig 258529c05d Modernize UICatalog scenarios and fix ReSharper warnings (#4544)
* Modernize ContextMenus scenario and add upgrade guide

- Add #nullable enable to ContextMenus.cs
- Move _cultureInfos initialization after Application.Init()
- Replace var with explicit types for Label
- Convert if statements to switch statement with not-null patterns
- Change local constants to SCREAMING_CASE per project conventions
- Add SCENARIO_UPGRADE_GUIDE.md with modernization checklist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Modernize TextInputControls scenario

- Add #nullable enable and fix all nullable warnings
- Use modern IApplication pattern with using IApplication app
- Replace var with explicit types for non-built-in types
- Use target-typed new () syntax throughout
- Add null checks for nullable fields and parameters
- Fix event handler sender parameter nullability
- Remove Application.Shutdown() (handled by IApplication disposal)
- Run ReSharper full cleanup for formatting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix ReSharper hints in TextInputControls and modernize Editor

TextInputControls.cs:
- Fix captured variable issue by using sender parameter
- Rename local function to camelCase (textViewDrawContent)
- Replace unused lambda parameters with discards (_)
- Convert List initializer to collection expression
- Remove unnecessary null check

Editor.cs:
- Add modern IApplication pattern with using IApplication app
- Replace Application.Run with app.Run
- Replace Application.RequestStop with _appWindow?.RequestStop
- Remove Application.Shutdown() (handled by IApplication disposal)
- Run ReSharper full cleanup for formatting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Update SCENARIO_UPGRADE_GUIDE with ReSharper hint fixes

Add guidance for:
- Lambda parameter discards (replace unused with _)
- Captured variable closures (use sender or disable warning)
- Local function naming (camelCase)
- Collection expressions (use [...] syntax)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Restructure AI guidance for drift prevention

Create .claude/ directory with focused rule files:
- REFRESH.md - Pre-edit checklist (read before every file)
- rules/type-declarations.md - No var except built-in types
- rules/target-typed-new.md - Use new() syntax
- rules/terminology.md - SubView/SuperView vs Parent/Child
- rules/event-patterns.md - Lambdas, closures, handlers
- rules/collection-expressions.md - [...] syntax
- rules/cwp-pattern.md - Cancellable Workflow Pattern
- tasks/scenario-modernization.md - Moved from Examples/

Simplify CLAUDE.md to reference .claude/ structure instead of
duplicating detailed guidance. This helps AI agents stay on track
by providing focused, re-readable micro-documents.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add Claude Code settings to .gitignore

These are user-local settings files that shouldn't be tracked.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add code layout guidance for ReSharper backing field bug

Document known ReSharper bug (RSRP-484963) where "Properties w/
Backing Field" layout doesn't work. AI agents must manually place
backing fields immediately before their associated properties.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix ReSharper warnings across UICatalog scenarios

- Replace `is { }` with `is not null` for simple null checks
- Fix unused lambda parameters: `(s, e)` → `(_, _)` or `(_, e)`
- Change `var` to explicit types (Label, Window, FrameView, etc.)
- Remove redundant null-forgiving operators and self-assignments
- Modernize Application.Init pattern with `using IApplication app`
- Use pattern matching: `if (sender is not OptionSelector x)`
- Preserve `is { } variable` pattern matching where variable capture needed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fixed two scenarios.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 12:39:15 -07:00

80 lines
1004 B
Plaintext

# Build artifacts
[Bb]in/
[Oo]bj/
[Rr]elease/
[Dd]ebug/
[Xx]64/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
# User-local settings and caches
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
*.userprefs
_ReSharper.**
*.[Rr]e[Ss]harper
*.DotSettings.user
.devcontainer/
.vscode/
.vs/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Roslyn generated cs files
**.g.cs
# Common temporary files
~$*
*~
# Exclude everything in packages directory except the packages/build directory
**/[Pp]ackages/*
!**/[Pp]ackages/build/
# API Docs
docfx/api
docfx/_site
# Test Results
UnitTests/TestResults
TestResults
# git merge files
*.orig
*.theirs
*.ours
demo.*
*.deb
*.tui/
*.dotCover
logs/
BenchmarkDotNet.Artifacts/
*.log
*.log.*
log.*
/Tests/coverage/
!/Tests/coverage/.gitkeep # keep folder in repo
/Tests/report/
*.cobertura.xml
# Claude Code local settings
.claude/settings.json
.claude/settings.local.json