class-metrix 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.prettierrc.json +41 -0
  3. data/.qlty/.gitignore +7 -0
  4. data/.qlty/configs/.yamllint.yaml +8 -0
  5. data/.qlty/qlty.toml +108 -0
  6. data/.rubocop.yml +31 -25
  7. data/.vscode/README.md +255 -47
  8. data/.vscode/extensions.json +8 -13
  9. data/.vscode/keybindings.json +0 -0
  10. data/.vscode/settings.json +81 -11
  11. data/.vscode/tasks.json +231 -0
  12. data/CHANGELOG.md +33 -1
  13. data/README.md +107 -23
  14. data/Rakefile +64 -1
  15. data/Steepfile +26 -0
  16. data/config/brakeman.yml +37 -0
  17. data/docs/ARCHITECTURE.md +90 -48
  18. data/docs/CHANGELOG_EVOLUTION_EXAMPLE.md +95 -0
  19. data/docs/QLTY_INTEGRATION.md +181 -0
  20. data/docs/RELEASE_GUIDE.md +318 -0
  21. data/docs/SLACK_INTEGRATION.md +227 -0
  22. data/examples/README.md +23 -17
  23. data/examples/basic_usage.rb +19 -19
  24. data/examples/debug_levels_demo.rb +15 -16
  25. data/examples/debug_mode_demo.rb +12 -13
  26. data/examples/inheritance_and_modules.rb +45 -45
  27. data/lib/class_metrix/extractor.rb +1 -1
  28. data/lib/class_metrix/extractors/constants_extractor.rb +1 -1
  29. data/lib/class_metrix/extractors/methods_extractor.rb +1 -1
  30. data/lib/class_metrix/extractors/multi_type_extractor.rb +2 -2
  31. data/lib/class_metrix/formatters/base/base_formatter.rb +3 -3
  32. data/lib/class_metrix/formatters/components/footer_component.rb +3 -3
  33. data/lib/class_metrix/formatters/components/generic_header_component.rb +2 -2
  34. data/lib/class_metrix/formatters/components/header_component.rb +4 -4
  35. data/lib/class_metrix/formatters/components/missing_behaviors_component.rb +7 -7
  36. data/lib/class_metrix/formatters/components/table_component/row_processor.rb +8 -5
  37. data/lib/class_metrix/formatters/components/table_component/table_data_extractor.rb +4 -1
  38. data/lib/class_metrix/formatters/components/table_component/table_renderer.rb +2 -2
  39. data/lib/class_metrix/formatters/components/table_component.rb +5 -4
  40. data/lib/class_metrix/formatters/csv_formatter.rb +3 -3
  41. data/lib/class_metrix/formatters/markdown_formatter.rb +3 -4
  42. data/lib/class_metrix/formatters/shared/markdown_table_builder.rb +2 -2
  43. data/lib/class_metrix/formatters/shared/table_builder.rb +8 -6
  44. data/lib/class_metrix/version.rb +1 -1
  45. data/sig/class_metrix.rbs +8 -0
  46. data/sig/extractor.rbs +54 -0
  47. data/sig/extractors.rbs +84 -0
  48. data/sig/formatters_base.rbs +59 -0
  49. data/sig/formatters_components.rbs +133 -0
  50. data/sig/formatters_main.rbs +20 -0
  51. data/sig/formatters_shared.rbs +102 -0
  52. data/sig/manifest.yaml +32 -0
  53. data/sig/utils.rbs +57 -0
  54. data/sig/value_processor.rbs +11 -0
  55. data/sig/version.rbs +4 -0
  56. metadata +94 -4
  57. data/RELEASE_GUIDE.md +0 -158
  58. data/sig/class/metrix.rbs +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 440b6eacf85b731cd683533be57ab3b2c17b25605ce70ed650bed43539f34531
4
- data.tar.gz: 728575b7ddac28f55d5d192f3e1004858f19820453a9e6c3d00002df50855c92
3
+ metadata.gz: 0106c0c9302df96ca95140d24c7b95cd1a9b5a6381336b96b6bd639e3edd3ba7
4
+ data.tar.gz: e8a1c3fe4e9a1be7253514ff9851a6af39b2aa0975444e38196e252c596f0fb2
5
5
  SHA512:
6
- metadata.gz: 868af534a658dc3a083315ee1660f4ba8754919474ac3d6c5c2458f2a5af8df763bfa292d6d1c426a0df20b4ef3419cd7cc031397bd14ed3a563f0dee07b605c
7
- data.tar.gz: 9bcfe4160f94b93abf072e1888c92222a790387f16e16d376ef93be48c28d4ac7ee1edd931c6b9e70236c64e3bec17d0610c2561db14ab80e60d4f0ed1a6af41
6
+ metadata.gz: c0518a94b39fbfd118a5d3e4961602619cc91e611bbfef3a6e63b5d1c1b799f30b004710a3edc2489a31a060d8e6c8143f974b90dad1aab60971427f51c5c32f
7
+ data.tar.gz: e22b3a3db21c49321dcc986f79efa2eaabfe42f7b05dc75ff89e204a40f1f75e8079a11b0c1a48a3598f67082b8dd760823cd3662747ac8c2a980c5eeadb5f2a
data/.prettierrc.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": false,
4
+ "tabWidth": 2,
5
+ "useTabs": false,
6
+ "trailingComma": "none",
7
+ "bracketSpacing": true,
8
+ "bracketSameLine": false,
9
+ "arrowParens": "avoid",
10
+ "printWidth": 80,
11
+ "endOfLine": "lf",
12
+ "proseWrap": "preserve",
13
+ "htmlWhitespaceSensitivity": "css",
14
+ "embeddedLanguageFormatting": "auto",
15
+ "overrides": [
16
+ {
17
+ "files": "*.json",
18
+ "options": {
19
+ "printWidth": 120,
20
+ "tabWidth": 2
21
+ }
22
+ },
23
+ {
24
+ "files": ["*.yml", "*.yaml"],
25
+ "options": {
26
+ "printWidth": 120,
27
+ "tabWidth": 2,
28
+ "singleQuote": false,
29
+ "bracketSpacing": true
30
+ }
31
+ },
32
+ {
33
+ "files": "*.md",
34
+ "options": {
35
+ "printWidth": 80,
36
+ "proseWrap": "preserve",
37
+ "tabWidth": 2
38
+ }
39
+ }
40
+ ]
41
+ }
data/.qlty/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ *
2
+ !configs
3
+ !configs/**
4
+ !hooks
5
+ !hooks/**
6
+ !qlty.toml
7
+ !.gitignore
@@ -0,0 +1,8 @@
1
+ rules:
2
+ document-start: disable
3
+ quoted-strings:
4
+ required: only-when-needed
5
+ extra-allowed: ["{|}"]
6
+ key-duplicates: {}
7
+ octal-values:
8
+ forbid-implicit-octal: true
data/.qlty/qlty.toml ADDED
@@ -0,0 +1,108 @@
1
+ # This file was automatically generated by `qlty init`.
2
+ # You can modify it to suit your needs.
3
+ # We recommend you to commit this file to your repository.
4
+ #
5
+ # This configuration is used by both Qlty CLI and Qlty Cloud.
6
+ #
7
+ # Qlty CLI -- Code quality toolkit for developers
8
+ # Qlty Cloud -- Fully automated Code Health Platform
9
+ #
10
+ # Try Qlty Cloud: https://qlty.sh
11
+ #
12
+ # For a guide to configuration, visit https://qlty.sh/d/config
13
+ # Or for a full reference, visit https://qlty.sh/d/qlty-toml
14
+ config_version = "0"
15
+
16
+ exclude_patterns = [
17
+ "*_min.*",
18
+ "*-min.*",
19
+ "*.min.*",
20
+ "**/.yarn/**",
21
+ "**/*.d.ts",
22
+ "**/assets/**",
23
+ "**/bower_components/**",
24
+ "**/build/**",
25
+ "**/cache/**",
26
+ "**/config/**",
27
+ "**/db/**",
28
+ "**/deps/**",
29
+ "**/dist/**",
30
+ "**/extern/**",
31
+ "**/external/**",
32
+ "**/generated/**",
33
+ "**/Godeps/**",
34
+ "**/gradlew/**",
35
+ "**/mvnw/**",
36
+ "**/node_modules/**",
37
+ "**/protos/**",
38
+ "**/seed/**",
39
+ "**/target/**",
40
+ "**/templates/**",
41
+ "**/testdata/**",
42
+ "**/vendor/**",
43
+ # Project-specific exclusions
44
+ "**/.github/**", # GitHub configuration files
45
+ "**/examples/**", # Example code doesn't need strict formatting
46
+ "**/docs/**", # Documentation files are less strict
47
+ "**/.vscode/**", # VS Code configuration files
48
+ "**/bin/**", # Script files
49
+ # Documentation files with relaxed formatting
50
+ "README.md", # Readme can have long lines
51
+ "CHANGELOG.md", # Changelog can have duplicate headers
52
+ ]
53
+
54
+ test_patterns = [
55
+ "**/test/**",
56
+ "**/spec/**",
57
+ "**/*.test.*",
58
+ "**/*.spec.*",
59
+ "**/*_test.*",
60
+ "**/*_spec.*",
61
+ "**/test_*.*",
62
+ "**/spec_*.*",
63
+ ]
64
+
65
+ [smells]
66
+ mode = "comment"
67
+
68
+ [[source]]
69
+ name = "default"
70
+ default = true
71
+
72
+
73
+ [[plugin]]
74
+ name = "actionlint"
75
+
76
+ [[plugin]]
77
+ name = "checkov"
78
+
79
+ [[plugin]]
80
+ name = "markdownlint"
81
+ mode = "comment"
82
+
83
+ [[plugin]]
84
+ name = "osv-scanner"
85
+
86
+ [[plugin]]
87
+ name = "prettier"
88
+
89
+ [[plugin]]
90
+ name = "ripgrep"
91
+ mode = "comment"
92
+
93
+ [[plugin]]
94
+ name = "rubocop"
95
+ version = "1.75.8"
96
+
97
+ [[plugin]]
98
+ name = "trivy"
99
+ drivers = [
100
+ "config",
101
+ "fs-vuln",
102
+ ]
103
+
104
+ [[plugin]]
105
+ name = "trufflehog"
106
+
107
+ [[plugin]]
108
+ name = "yamllint"
data/.rubocop.yml CHANGED
@@ -3,11 +3,14 @@ AllCops:
3
3
  SuggestExtensions: false
4
4
  NewCops: enable
5
5
  Exclude:
6
- - 'bin/*'
7
- - 'examples/**/*'
8
- - 'vendor/**/*'
9
- - 'node_modules/**/*'
10
- - '.ruby-lsp/**/*'
6
+ - bin/*
7
+ - config/**/*
8
+ - examples/**/*
9
+ - tmp/**/*
10
+ - vendor/**/*
11
+ - node_modules/**/*
12
+ - .ruby-lsp/**/*
13
+ - Rakefile
11
14
 
12
15
  # String literal styles
13
16
  Style/StringLiterals:
@@ -18,49 +21,52 @@ Style/StringLiteralsInInterpolation:
18
21
 
19
22
  # Documentation requirements
20
23
  Style/Documentation:
21
- Enabled: false # Many classes don't need top-level documentation
24
+ Enabled: false # Many classes don't need top-level documentation
22
25
 
23
26
  # Method and class length limits
24
27
  Metrics/MethodLength:
25
- Max: 25 # Increased to accommodate current codebase
28
+ Max: 25 # Increased to accommodate current codebase
26
29
 
27
30
  Metrics/ClassLength:
28
- Max: 250 # Increased to accommodate complex formatter classes
31
+ Max: 250 # Increased to accommodate complex formatter classes
29
32
 
30
33
  Metrics/BlockLength:
31
- Max: 30 # Slightly increased from default
34
+ Max: 30 # Slightly increased from default
32
35
  Exclude:
33
- - 'spec/**/*' # Allow long blocks in tests
34
- - 'class-metrix.gemspec' # Allow long blocks in gemspec
36
+ - spec/**/* # Allow long blocks in tests
37
+ - class-metrix.gemspec # Allow long blocks in gemspec
35
38
 
36
39
  # Complexity limits
37
40
  Metrics/AbcSize:
38
- Max: 35 # Increased to accommodate current codebase
41
+ Max: 35 # Increased to accommodate current codebase
39
42
 
40
43
  Metrics/CyclomaticComplexity:
41
- Max: 15 # Increased to accommodate current codebase
44
+ Max: 15 # Increased to accommodate current codebase
42
45
 
43
46
  Metrics/PerceivedComplexity:
44
- Max: 15 # Increased to accommodate current codebase
47
+ Max: 15 # Increased to accommodate current codebase
45
48
 
46
49
  # Line length
47
50
  Layout/LineLength:
48
- Max: 140 # Increased from default 120
51
+ Max: 140 # Increased from default 120
49
52
 
50
53
  # Naming conventions
51
54
  Naming/AccessorMethodName:
52
- Enabled: false # Allow get_ prefixed methods
55
+ Enabled: false # Allow get_ prefixed methods
53
56
 
54
- Naming/PredicateName:
55
- Enabled: false # Allow has_ prefixed methods
57
+ Naming/PredicatePrefix:
58
+ Enabled: false # Allow has_ prefixed methods
59
+
60
+ Naming/PredicateMethod:
61
+ Enabled: false # Allow boolean methods without ? suffix in tests
56
62
 
57
63
  # Optional boolean parameters
58
64
  Style/OptionalBooleanParameter:
59
- Enabled: false # Allow boolean default parameters
65
+ Enabled: false # Allow boolean default parameters
60
66
 
61
67
  # Gemspec warning
62
68
  Gemspec/RequiredRubyVersion:
63
- Enabled: false # Allow different ruby versions in gemspec vs rubocop
69
+ Enabled: false # Allow different ruby versions in gemspec vs rubocop
64
70
 
65
71
  # Script permissions (for examples)
66
72
  Lint/ScriptPermission:
@@ -72,17 +78,17 @@ Lint/ConstantDefinitionInBlock:
72
78
 
73
79
  # String concatenation
74
80
  Style/StringConcatenation:
75
- Enabled: false # Allow string concatenation in some cases
81
+ Enabled: false # Allow string concatenation in some cases
76
82
 
77
83
  # Additional cops to disable based on project needs
78
84
  Gemspec/DevelopmentDependencies:
79
- Enabled: false # Allow development dependencies in gemspec
85
+ Enabled: false # Allow development dependencies in gemspec
80
86
 
81
87
  Lint/DuplicateBranch:
82
- Enabled: false # Allow duplicate rescue branches for different error types
88
+ Enabled: false # Allow duplicate rescue branches for different error types
83
89
 
84
90
  Style/ComparableClamp:
85
- Enabled: false # Allow traditional min/max patterns for clarity
91
+ Enabled: false # Allow traditional min/max patterns for clarity
86
92
 
87
93
  Lint/NonAtomicFileOperation:
88
- Enabled: false # Allow traditional file existence checks in specs
94
+ Enabled: false # Allow traditional file existence checks in specs
data/.vscode/README.md CHANGED
@@ -1,72 +1,280 @@
1
- # VS Code Works### Ruby Support
1
+ # VS Code Development Environment for ClassMetrix
2
2
 
3
- - **Ruby LSP** (`shopify.ruby-lsp`) - Primary Ruby language server with Rubocop formatting
4
- - **Solargraph** (`castwide.solargraph`) - Alternative Ruby IntelliSense
3
+ ## 🎯 Overview
5
4
 
6
- ### Markdown Support
5
+ This directory contains a comprehensive VS Code development environment for the ClassMetrix Ruby gem, featuring modern Ruby development practices with full type safety through RBS and Steep integration.
7
6
 
8
- - **Prettier** (`esbenp.prettier-vscode`) - Primary Markdown formatter
9
- - **Markdown All in One** (`yzhang.markdown-all-in-one`) - Comprehensive Markdown support
10
- - **markdownlint** (`davidanson.vscode-markdownlint`) - Markdown lintingnfiguration
7
+ ## 🌟 Key Features
11
8
 
12
- This folder contains VS Code workspace configuration files that help maintain consistent development environment across team members.
9
+ - **🔧 Complete Ruby LSP Integration** - Full language support with intelligent code completion
10
+ - **🔍 Real-time Type Checking** - Steep integration with live error detection
11
+ - **📝 RBS Type Annotations** - Full support for Ruby signature files
12
+ - **🚀 Auto-formatting** - RuboCop integration with format-on-save
13
+ - **⌨️ Custom Keyboard Shortcuts** - Optimized development workflow
14
+ - **🧪 Integrated Testing** - One-click RSpec test execution
15
+ - **🛠️ Smart Problem Matching** - VS Code integration for all tools
13
16
 
14
- ## Files Overview
17
+ ## 📦 Extensions Configuration
15
18
 
16
- - **settings.json**: Workspace-specific settings for Ruby and Markdown formatting
17
- - **extensions.json**: Recommended extensions for this project
18
- - **tasks.json**: Predefined tasks for common operations (Rubocop, RSpec)
19
- - **launch.json**: Debug configurations for Ruby files and tests
19
+ ### Required Extensions (Auto-installed)
20
20
 
21
- ## Required Extensions
21
+ Our `extensions.json` automatically recommends these essential extensions:
22
22
 
23
- To get the best development experience, install these recommended extensions:
23
+ - **Ruby LSP** (`shopify.ruby-lsp`) - Primary Ruby language server
24
+ - **Steep VS Code** (`soutaro.steep-vscode`) - Real-time type checking
25
+ - **Ruby Debugger** (`koichisasada.vscode-rdbg`) - Advanced debugging support
24
26
 
25
- ### Ruby Support
27
+ ### Productivity Extensions
26
28
 
27
- - **Ruby LSP** (`shopify.ruby-lsp`) - Primary Ruby language server
28
- - **Solargraph** (`castwide.solargraph`) - Alternative Ruby IntelliSense
29
+ - **Prettier** (`esbenp.prettier-vscode`) - Markdown and JSON formatting
30
+ - **GitLens** (`eamodio.gitlens`) - Enhanced Git integration
31
+ - **YAML Support** (`redhat.vscode-yaml`) - YAML file support
32
+ - **EditorConfig** (`editorconfig.editorconfig`) - Consistent editor settings
33
+
34
+ ## ⚙️ Intelligent Settings Configuration
35
+
36
+ ### Ruby Language Support
37
+
38
+ Our settings provide optimal Ruby development experience:
39
+
40
+ ```json
41
+ {
42
+ "ruby.format": "rubocop", // Use RuboCop for formatting
43
+ "ruby.useLanguageServer": true, // Enable Ruby LSP
44
+ "ruby.intellisense": "rubyLsp", // Intelligent code completion
45
+ "editor.formatOnSave": true, // Auto-format on save
46
+ "editor.semanticHighlighting.enabled": true // Enhanced syntax highlighting
47
+ }
48
+ ```
49
+
50
+ ### File-Specific Configurations
51
+
52
+ #### Ruby Files (`.rb`, `.gemspec`, `Rakefile`)
53
+
54
+ - **Formatter**: Ruby LSP with RuboCop
55
+ - **Tab Size**: 2 spaces
56
+ - **Line Length**: 140 characters
57
+ - **Auto-fix**: RuboCop issues on save
58
+
59
+ #### RBS Files (`.rbs`)
60
+
61
+ - **Formatter**: RBS syntax formatter
62
+ - **Tab Size**: 2 spaces
63
+ - **Line Length**: 120 characters
64
+ - **Semantic Highlighting**: Enabled
65
+
66
+ #### Markdown Files (`.md`)
67
+
68
+ - **Formatter**: Prettier
69
+ - **Word Wrap**: Enabled
70
+ - **Tab Size**: 2 spaces
71
+
72
+ ### Type Checking Integration
73
+
74
+ - **Steep**: Real-time type checking with diagnostics
75
+ - **RBS Validation**: Automatic signature file validation
76
+ - **Error Integration**: Problems panel integration
77
+
78
+ ## 🛠️ Available Tasks
79
+
80
+ Access tasks via `Ctrl+Shift+P` → "Tasks: Run Task" or use keyboard shortcuts:
81
+
82
+ ### Ruby Development Tasks
83
+
84
+ | Task | Description | Group |
85
+ | ----------------------------- | ----------------------------------------- | ----- |
86
+ | **Rubocop: Check** | Lint all Ruby files with problem matching | Test |
87
+ | **Rubocop: Fix** | Auto-fix all RuboCop issues | Build |
88
+ | **Rubocop: Fix Current File** | Fix only the current file | Build |
89
+ | **RSpec: Run All Tests** | Execute entire test suite | Test |
90
+ | **RSpec: Run Current File** | Run tests for current file only | Test |
91
+ | **Bundle Install** | Install gem dependencies | Build |
92
+
93
+ ### Type Checking & RBS Tasks
94
+
95
+ | Task | Description | Group |
96
+ | ---------------------------- | ---------------------------------------- | ----- |
97
+ | **RBS: Validate** | Validate RBS syntax with error detection | Test |
98
+ | **RBS: Generate Prototypes** | Generate RBS from Ruby code | Build |
99
+ | **Steep: Type Check** | Run one-time type checking | Test |
100
+ | **Steep: Watch Mode** | Continuous type checking (background) | Build |
101
+ | **Steep: Watch All Targets** | Watch all configured targets | Build |
102
+
103
+ ### Problem Matchers
104
+
105
+ All tasks include intelligent problem matchers that integrate errors directly into VS Code's Problems panel:
106
+
107
+ - **RuboCop**: File/line/column error positioning
108
+ - **RSpec**: Test failure integration
109
+ - **Steep**: Type error reporting with severity levels
110
+ - **RBS**: Syntax validation errors
111
+
112
+ ## ⌨️ Custom Keyboard Shortcuts
113
+
114
+ Our workflow uses a two-key chord system starting with `Ctrl+Shift+R`:
115
+
116
+ ### Primary Shortcuts
117
+
118
+ | Shortcut | Task | Description |
119
+ | ---------------------- | --------------------- | ------------------------------ |
120
+ | `Ctrl+Shift+R, Ctrl+V` | **RBS: Validate** | Validate type signatures |
121
+ | `Ctrl+Shift+R, Ctrl+S` | **Steep: Type Check** | Run type checking |
122
+ | `Ctrl+Shift+R, Ctrl+W` | **Steep: Watch Mode** | Start continuous type checking |
123
+ | `Ctrl+Shift+R, Ctrl+R` | **Rubocop: Fix** | Auto-fix code style issues |
124
+
125
+ ### Usage Pattern
126
+
127
+ 1. **Press `Ctrl+Shift+R`** to enter "Ruby development mode"
128
+ 2. **Press the second key** for the specific action
129
+ 3. **View results** in the integrated terminal or Problems panel
130
+
131
+ ## 🚀 Getting Started
132
+
133
+ ### 1. Automatic Extension Installation
134
+
135
+ When you open this workspace in VS Code, you'll be prompted to:
136
+
137
+ - Install recommended extensions
138
+ - Enable workspace settings
139
+ - Configure the development environment
140
+
141
+ ### 2. Verify Your Setup
142
+
143
+ #### Basic Functionality Check
144
+
145
+ 1. **Open any `.rb` file** → Should show Ruby LSP features (autocompletion, hover info)
146
+ 2. **Open any `.rbs` file** → Should have syntax highlighting and validation
147
+ 3. **Save a Ruby file** → Should auto-format with RuboCop
148
+
149
+ #### Test Keyboard Shortcuts
150
+
151
+ 1. **Press `Ctrl+Shift+R, Ctrl+S`** → Should run type checking
152
+ 2. **Press `Ctrl+Shift+R, Ctrl+W`** → Should start watch mode
153
+ 3. **Press `Ctrl+Shift+R, Ctrl+V`** → Should validate RBS files
154
+
155
+ ### 3. Development Workflow
156
+
157
+ #### For Active Development
158
+
159
+ ```bash
160
+ # Start continuous type checking
161
+ Ctrl+Shift+R, Ctrl+W
162
+
163
+ # Make your changes...
164
+ # Files auto-format on save
165
+ # See real-time type checking feedback
166
+ ```
167
+
168
+ #### For Code Review
169
+
170
+ ```bash
171
+ # Check all types
172
+ Ctrl+Shift+R, Ctrl+S
173
+
174
+ # Fix all style issues
175
+ Ctrl+Shift+R, Ctrl+R
176
+
177
+ # Validate RBS signatures
178
+ Ctrl+Shift+R, Ctrl+V
179
+ ```
180
+
181
+ ## 🔧 Advanced Configuration
182
+
183
+ ### Debug Configuration
184
+
185
+ The included `launch.json` provides Ruby debugging setup:
186
+
187
+ - **Ruby Debug** - Full debugging support with breakpoints
188
+ - **RSpec Debug** - Debug individual test files
189
+ - **Integration** with `vscode-rdbg` extension
190
+
191
+ ### Workspace Settings
192
+
193
+ Key workspace-specific settings:
194
+
195
+ ```json
196
+ {
197
+ "files.autoSave": "onFocusChange", // Save when switching files
198
+ "files.trimTrailingWhitespace": true, // Clean trailing spaces
199
+ "files.insertFinalNewline": true, // Ensure final newline
200
+ "breadcrumbs.enabled": true, // Show code breadcrumbs
201
+ "workbench.editor.enablePreview": false // Always open new tabs
202
+ }
203
+ ```
204
+
205
+ ### File Associations
206
+
207
+ Automatic recognition for Ruby ecosystem files:
208
+
209
+ - `*.gemspec` → Ruby
210
+ - `Gemfile` → Ruby
211
+ - `Rakefile` → Ruby
212
+ - `Steepfile` → Ruby
213
+ - `*.rbs` → RBS
214
+ - `.rubocop.yml` → YAML
215
+
216
+ ## 📊 Development Status
217
+
218
+ ### Type Safety Status
219
+
220
+ ✅ **RBS Coverage**: Complete type annotations for all public APIs
221
+ ✅ **Steep Integration**: Real-time type checking with zero errors
222
+ ✅ **Problem Matching**: All type errors appear in VS Code Problems panel
223
+
224
+ ### Code Quality Status
225
+
226
+ ✅ **RuboCop Integration**: Auto-formatting and linting on save
227
+ ✅ **Test Integration**: One-click RSpec execution with results
228
+ ✅ **Git Integration**: GitLens for enhanced version control
229
+
230
+ ### Workflow Optimization
231
+
232
+ ✅ **Keyboard Shortcuts**: Efficient two-key chord system
233
+ ✅ **Background Tasks**: Watch mode for continuous feedback
234
+ ✅ **Smart Defaults**: Optimized settings for Ruby development
235
+
236
+ ## 🛠️ Troubleshooting
29
237
 
30
- ### Markdown Support
238
+ ### Common Issues
31
239
 
32
- - **Markdown All in One** (`yzhang.markdown-all-in-one`) - Comprehensive Markdown support
33
- - **markdownlint** (`davidanson.vscode-markdownlint`) - Markdown linting
240
+ #### Extensions Not Loading
34
241
 
35
- ### General
242
+ - Ensure you've accepted the workspace extension recommendations
243
+ - Restart VS Code after installing extensions
244
+ - Check VS Code version compatibility
36
245
 
37
- - **EditorConfig** (`editorconfig.editorconfig`) - Consistent coding styles
38
- - **GitLens** (`eamodio.gitlens`) - Enhanced Git capabilities
246
+ #### Type Checking Not Working
39
247
 
40
- ## Auto-formatting
248
+ - Verify Steep is in your Gemfile: `gem 'steep', '~> 1.0'`
249
+ - Run `bundle install` to ensure dependencies
250
+ - Check that `Steepfile` exists in project root
41
251
 
42
- The configuration enables automatic formatting on save for:
252
+ #### RuboCop Not Formatting
43
253
 
44
- - **Ruby files**: Using Rubocop via Ruby LSP (Shopify.ruby-lsp)
45
- - **Markdown files**: Using Prettier formatter
46
- - **Format on type**: Enabled for Ruby files for real-time formatting
254
+ - Ensure `.rubocop.yml` configuration exists
255
+ - Install RuboCop: `gem install rubocop`
256
+ - Check Ruby LSP is using RuboCop formatter
47
257
 
48
- ## Available Tasks
258
+ ### Debug Commands
49
259
 
50
- Access via `Ctrl+Shift+P` → "Tasks: Run Task":
260
+ ```bash
261
+ # Check Ruby LSP status
262
+ Ruby LSP: Show Output Channel
51
263
 
52
- - **Rubocop: Check** - Run Rubocop linting
53
- - **Rubocop: Fix** - Auto-fix Rubocop violations
54
- - **Rubocop: Fix Current File** - Fix violations in current file only
55
- - **RSpec: Run All Tests** - Run complete test suite
56
- - **RSpec: Run Current File** - Run tests for current file
57
- - **Bundle Install** - Install/update gems
264
+ # Verify Steep configuration
265
+ bundle exec steep check --debug
58
266
 
59
- ## Debug Configurations
267
+ # Test RuboCop configuration
268
+ bundle exec rubocop --version
269
+ ```
60
270
 
61
- Available debug configurations:
271
+ ## 📚 Additional Resources
62
272
 
63
- - **Ruby: Run Current File** - Debug the currently open Ruby file
64
- - **RSpec: Debug Current File** - Debug tests in current file
65
- - **RSpec: Debug All Tests** - Debug entire test suite
273
+ - **[Ruby LSP Documentation](https://shopify.github.io/ruby-lsp/)**
274
+ - **[Steep Type Checker](https://github.com/soutaro/steep)**
275
+ - **[RBS Documentation](https://github.com/ruby/rbs)**
276
+ - **[RuboCop Configuration](https://docs.rubocop.org/)**
66
277
 
67
- ## Setup Instructions
278
+ ---
68
279
 
69
- 1. Open this project in VS Code
70
- 2. Install recommended extensions (VS Code will prompt you)
71
- 3. Run "Bundle Install" task to ensure gems are installed
72
- 4. Start coding! Auto-formatting will work on save
280
+ This VS Code setup provides a modern, type-safe Ruby development environment optimized for the ClassMetrix gem development workflow.
@@ -1,15 +1,16 @@
1
- { "recommendations": [
1
+ {
2
+ "recommendations": [
2
3
  // Ruby language support
3
4
  "shopify.ruby-lsp",
4
- "castwide.solargraph",
5
5
 
6
- // Alternative Ruby support (choose one of the above)
7
- // "rebornix.ruby",
6
+ // RBS and Steep support (type checking)
7
+ "soutaro.steep-vscode",
8
+
9
+ // Debugging support
10
+ "koichisasada.vscode-rdbg",
8
11
 
9
12
  // Markdown support
10
13
  "esbenp.prettier-vscode",
11
- "yzhang.markdown-all-in-one",
12
- "davidanson.vscode-markdownlint",
13
14
 
14
15
  // General productivity
15
16
  "ms-vscode.vscode-json",
@@ -17,12 +18,6 @@
17
18
  "editorconfig.editorconfig",
18
19
 
19
20
  // Git integration
20
- "eamodio.gitlens",
21
-
22
- // Additional helpful extensions
23
- "ms-vscode.test-adapter-converter",
24
- "hbenl.vscode-test-explorer",
25
- "formulahendry.auto-rename-tag",
26
- "bradlc.vscode-tailwindcss"
21
+ "eamodio.gitlens"
27
22
  ]
28
23
  }
File without changes