Repository navigation
feat(TW0007): analyzer for namespace-first file-level usings - #38
Merged
StevenTCramer merged 4 commits intoSep 20, 2026
Merged
StevenTCramer merged 4 commits into
StevenTCramer merged 4 commits into
Conversation
Replace BDSoftware GlobalUsingsAnalyzer; visit usings after file-scoped namespace. Default filename kebab global-usings.cs. Co-Authored-By: grok <noreply@x.ai>
BDSoftware GlobalUsingsAnalyzer only walks compilation-unit usings, so TimeWarp namespace-first file-scoped files never fire. Ship our own opt-in TW0007 with kebab global-usings.cs default. Co-Authored-By: grok <noreply@x.ai>
Keep the implementation-review trail on this host task: effort 1 found no issues, so Results can record a clean disposition. Co-Authored-By: grok <noreply@x.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shipped TW0007 (
GlobalUsingsRuleAnalyzer) in TimeWarp.SourceGenerators 1.0.0-beta.11. DiagnosticAnalyzer visits everyUsingDirectiveSyntax(compilation unit, file-scoped namespace-first, and block namespace). Skipsglobal using,using static, aliases, generated/build-output paths, the configured global-usings file, andexcluded_files. Default filename is kebabglobal-usings.cs.isEnabledByDefault: false; default severity warning when enabled. No BDSoftware / GlobalUsingsAnalyzer package. Code-fix left out of scope.Files changed
source/timewarp-source-generators/global-usings-rule-analyzer.cssource/timewarp-source-generators/AnalyzerReleases.Unshipped.mdsource/Directory.Build.props1.0.0-beta.11.editorconfigglobalusingsanalyzer000*tests/timewarp-source-generators-analyzer-tests/**tests/timewarp-source-generators-test-console/**global-usings.cs; TW0007=error smoketools/dev-cli/endpoints/test-command.csreadme.md,documentation/**source/timewarp-source-generators/interface-delegation-generator.csKey decisions
FileScopedNamespaceDeclarationSyntax.Usingsare not missed.global-usings.cs.Test outcomes
dotnet run --file tools/dev-cli/dev.cs -- test— PASS (test-console + 11/11 TW0007 cases). No BDSoftware package refs.Test plan
Automated
dotnet run --file tools/dev-cli/dev.cs -- testExpect: test-console prints kebab/multi-dot/Pascal messages; analyzer-tests prints
Passed: 11 Failed: 0 Total: 11;Tests completed successfully!Smoke
Expect: PASS lines for namespace-first warn, usings-before-namespace warn, and no-warn for
global using/using static/ alias /global-usings.cs; PascalCase filename configurable.Expect: pack id
TimeWarp.SourceGeneratorsversion1.0.0-beta.11.rg -i 'BDSoftware|GlobalUsingsAnalyzer' Directory.Packages.propsis empty.Not in scope: Ganda 284 audit rewrite; TimeWarp.State using sweep; code-fix.
Kanban task 028
Session: Grok ganda