diff --git a/src/content/docs/commands.mdx b/src/content/docs/commands.mdx index 3c2343d..c34f24f 100644 --- a/src/content/docs/commands.mdx +++ b/src/content/docs/commands.mdx @@ -292,9 +292,10 @@ See: [GitHub Integration](/integrations/github/) ## Code Analysis ```bash -roborev analyze test-fixtures internal/*_test.go # Run built-in analysis -roborev analyze refactor --fix ./... # Analyze and auto-fix +roborev analyze duplication ./... # Find duplication +roborev analyze refactor --fix *.go # Suggest and apply refactors roborev analyze complexity --per-file src/*.go # One job per file +roborev analyze test-fixtures internal/*_test.go # Find test helper opportunities roborev analyze refactor --branch # Analyze changed files on branch roborev analyze refactor --branch=feature-xyz # Analyze a specific branch roborev analyze --list # List analysis types diff --git a/src/content/docs/guides/assisted-refactoring.mdx b/src/content/docs/guides/assisted-refactoring.mdx index 5ccb152..fc0bb67 100644 --- a/src/content/docs/guides/assisted-refactoring.mdx +++ b/src/content/docs/guides/assisted-refactoring.mdx @@ -18,13 +18,13 @@ Seven built-in analysis types target common refactoring concerns: | Type | Description | |------|-------------| -| `test-fixtures` | Find test fixture and helper opportunities to reduce duplication | -| `duplication` | Find code duplication across files | -| `refactor` | Suggest refactoring opportunities | -| `complexity` | Analyze complexity and suggest simplifications | -| `api-design` | Review API consistency and design patterns | -| `dead-code` | Find unused exports and unreachable code | -| `architecture` | Review architectural patterns and structure | +| `duplication` | Finds exact and structural code duplication across files and suggests consolidation opportunities. | +| `refactor` | Identifies code smells like long functions, complex conditionals, poor naming, and tight coupling. | +| `complexity` | Looks for complex functions, deep nesting, and large conditionals, then suggests simplifications. | +| `test-fixtures` | Finds repeated test setup, duplicated mocks, and similar assertion sequences across test files. | +| `api-design` | Reviews public API surface for naming consistency, parameter ordering, and error handling patterns. | +| `dead-code` | Finds unused exports, unreachable code paths, and stale commented-out code. | +| `architecture` | Evaluates package organization, dependency flow, separation of concerns, and layering violations. | List available types with `roborev analyze --list`, or preview a prompt template with `roborev analyze --show-prompt `. If you have shell completions enabled, `roborev analyze ` will suggest analysis types with descriptions.