feat: add comprehensive Sorbet type annotations with ActiveSupport::Concern support
- Add sorbet-runtime dependency to gemspec - Add comprehensive type annotations to Configuration class - Create RBI file with mixes_in_class_methods for proper class method typing - Add ActiveSupport::Concern shim to handle included and class_methods DSL - Add parameter validation for edge cases when RBI bypasses runtime checks - Update tests to expect correct error messages from manual validation - All 26 tests passing with full type safety - Sorbet type checker passes with no errors This implements the ActiveSupport::Concern DSL generator approach from https://github.com/Shopify/tapioca/pull/360 to properly handle Sorbet type checking with ActiveSupport::Concern modules.
This commit is contained in:
@@ -45,13 +45,11 @@ pre-commit:
|
||||
|
||||
json-lint:
|
||||
glob: "*.json"
|
||||
exclude: |
|
||||
.devcontainer/devcontainer.json
|
||||
.vscode/settings.json
|
||||
run: |
|
||||
for file in {staged_files}; do
|
||||
# Skip devcontainer.json files which use JSONC format
|
||||
if [ "$(echo "$file" | grep -c 'devcontainer.json')" -gt 0 ] || [ "$(echo "$file" | grep -c '.vscode')" -gt 0 ]; then
|
||||
echo "Skipping JSONC file: $file"
|
||||
continue
|
||||
fi
|
||||
echo "Checking $file"
|
||||
ruby -e "require 'json'; JSON.parse(File.read('$file'))" || exit 1
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user