Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<!-- Output packages to our local feed directory -->
<PackageOutputPath>$(PackagesDirectory)</PackageOutputPath>

<!-- Use local NuGet cache instead of global -->
<RestorePackagesPath>$(RepositoryRoot).nuget-cache/</RestorePackagesPath>

<!-- Suppress .NET preview SDK message -->
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
Expand Down
11 changes: 0 additions & 11 deletions _ai/Index.md

This file was deleted.

43 changes: 0 additions & 43 deletions _ai/ai-instructions.md

This file was deleted.

44 changes: 0 additions & 44 deletions _ai/csharp-coding-standards.md

This file was deleted.

13 changes: 0 additions & 13 deletions _ai/dotnet-conventions.md

This file was deleted.

9 changes: 0 additions & 9 deletions _ai/environment.md

This file was deleted.

56 changes: 0 additions & 56 deletions _ai/nugets.md

This file was deleted.

27 changes: 0 additions & 27 deletions _ai/project-structure.md

This file was deleted.

73 changes: 0 additions & 73 deletions _ai/references.md

This file was deleted.

13 changes: 0 additions & 13 deletions _ai/shell-commands.md

This file was deleted.

11 changes: 0 additions & 11 deletions _ai/tools.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ Rename files to kebab-case:
- `UserService.cs` → `user-service.cs`
- `IDataProcessor.cs` → `i-data-processor.cs`

**Multi-dot partials** (e.g. state/action files) are valid when **every** segment is kebab-case.
Only rename non-kebab segments; do not collapse multi-dot names into a single stem:

| Invalid | Valid |
|---------|--------|
| `ApplicationState.CloseModal.cs` | `application-state.close-modal.cs` |
| `application-state.CloseModal.cs` | `application-state.close-modal.cs` |
| `application_state.close_modal.cs` | `application-state.close-modal.cs` |

Valid multi-dot examples (no rename needed):
- `application-state.close-modal.cs`
- `counter-state.increment-counter.cs`
- `weather-forecasts-state.fetch-weather-forecasts.cs`

## Troubleshooting

### Too Many Violations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The FileNameRuleAnalyzer enforces kebab-case naming conventions for C# source fi
- **Rule ID**: TW0001
- **Category**: Naming
- **Default Severity**: Info (disabled by default)
- **Message**: File '{0}' should use kebab-case naming convention (e.g., 'my-file.cs')
- **Message**: File '{0}' should use kebab-case naming convention (e.g., 'my-file.cs' or 'my-type.my-partial.cs')

> **Diagnostic ID (SSOT):** This rule is **TW0001** from TimeWarp.SourceGenerators. It is **not** a TimeWarp Architecture analyzer (`TWA*`). Do **not** enable or suppress it with `TWA001` / `dotnet_diagnostic.TWA001.*` — use `dotnet_diagnostic.TW0001.*` and `#pragma warning disable TW0001`.

Expand All @@ -21,19 +21,33 @@ Valid kebab-case file names must:
- Separate words with hyphens (-)
- Not contain consecutive hyphens
- End with `.cs` extension
- **Multi-dot basenames** are allowed when **every** segment between dots is itself kebab-case
(common for partials such as state/action files)

Pattern (conceptual):

```text
^[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*)*\.cs$
```

### Valid Examples
- `user-service.cs`
- `data-processor.cs`
- `my-component.cs`
- `api-client-v2.cs`
- `application-state.close-modal.cs` (multi-dot partial)
- `counter-state.increment-counter.cs` (multi-dot partial)
- `weather-forecasts-state.fetch-weather-forecasts.cs` (multi-dot partial)

### Invalid Examples
- `UserService.cs` (PascalCase)
- `userService.cs` (camelCase)
- `user_service.cs` (snake_case)
- `user--service.cs` (consecutive hyphens)
- `-user-service.cs` (starts with hyphen)
- `ApplicationState.CloseModal.cs` (Pascal multi-dot)
- `application-state.CloseModal.cs` (mixed multi-dot; one Pascal segment)
- `application_state.close_modal.cs` (snake_case segments)

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion documentation/developer/reference/analyzers/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ All analyzer diagnostic IDs from this package use the **TW** prefix (e.g. **TW00

### TW0001 - File Name Rule Analyzer

Enforces kebab-case naming convention for C# source files.
Enforces kebab-case naming convention for C# source files (including multi-segment kebab basenames such as `application-state.close-modal.cs`).

- **Rule ID**: TW0001
- **Category**: Naming
Expand Down
Loading
Loading