Copilot

Results 4682 issues of Copilot

This PR modernizes the exfacebook library by updating all dependencies to current secure versions and fixing deprecated configuration patterns. ## 🔧 Key Changes ### Dependencies Updated - **HTTPoison**: `~> 0.9`...

The `define-syntax-parser-to-define-syntax-parse-rule-simple` rule was incorrectly matching and stripping `syntax` wrappers from all body forms, including cases where the body used `syntax/loc`, had no wrapper, or used `quasisyntax`. **Changes:** - Match...

The Resyntax CLI had no test coverage for argument parsing or file refactoring functionality. ## Changes - **Added 21 test cases** in `cli.rkt` covering: - Argument parsing for `analyze` and...

Refactoring rules need to know the expansion context (`'module`, `'expression`, `'internal-definition`) of forms to determine valid transformations. This adds an expansion analyzer that labels each form with its context based...

Nested syntax template flattening operations can be simplified. The pattern `(apply append (map syntax->list (syntax->list #'((a ...) ...))))` does the same work as `(syntax->list #'(a ... ...))` but with unnecessary...

Suggests replacing `make-immutable-hash` with quasiquoted pairs with the simpler `hash` constructor when all keys are statically known. ### Changes - Added `make-immutable-hash-with-quasiquote-to-hash` rule to `hash-shortcuts.rkt` - Matches pattern `(make-immutable-hash `((key...

The `when-expression-in-for-loop-to-when-keyword` and `unless-expression-in-for-loop-to-unless-keyword` rules were refactoring single-statement loops, which doesn't meaningfully reduce indentation or improve readability. ## Changes - Added `#:when (>= (length (attribute body)) 2)` guard to both...

Adds a `keep-sorted` macro that marks collections for Resyntax to keep sorted. When elements are out of order, Resyntax suggests reordering them alphabetically by identifier name. ## Changes - **`keep-sorted.rkt`**...

Adds statistics mode for analyzing rule usefulness across large codebases. Addresses #28. ## Changes - Add `--output-summary-stats-only` flag to `resyntax analyze` command - When no `--refactoring-rule` filter: prints matches grouped...

The identifier-usage-analyzer was not counting identifier uses recorded in the `'disappeared-use` syntax property, which macros use to mark identifiers referenced during expansion but not appearing in the expanded code. ##...