Skip to content

🧹 [cli] Implement fix flag for lint command - #108

Merged
Tcode-Motion merged 2 commits into
mainfrom
fix-lint-fix-flag-17829198053786084401
Sep 8, 2026
Merged

🧹 [cli] Implement fix flag for lint command#108
Tcode-Motion merged 2 commits into
mainfrom
fix-lint-fix-flag-17829198053786084401

Conversation

@Tcode-Motion

Copy link
Copy Markdown
Owner

🎯 What: (the code health issue addressed)
The lint command advertised a --fix flag in its CLI help text ("Attempt to automatically fix lint issues", "Lints source files and optionally fixes deprecated keywords"), but the functionality was never implemented.

💡 Why: (how this improves maintainability)
Implementing this flag allows developers to automatically clean up deprecated keywords (like make, build, return in favor of do, send, etc.) natively via tsc lint --fix instead of having to rely strictly on the tsc migrate command, aligning the CLI behavior with user expectations.

Verification: (how you confirmed the change is safe)
Ran cargo test -p techscript_cli to confirm that making migrate_source public and importing it within lint.rs did not introduce regressions in CLI behavior. Confirmed changes write safely to disk by only modifying files where the content actually differs.

Result: (the improvement achieved)
The --fix flag on tsc lint now correctly leverages the existing AST deprecation tracking to automate syntax migration and resolve "fix lint issues" false positives.


PR created automatically by Jules for task 17829198053786084401 started by @Tcode-Motion

Updates `cli/src/commands/migrate.rs` to expose `migrate_source` publicly.
Updates `cli/src/commands/lint.rs` to consume `migrate_source` when the `--fix` flag is true, conditionally modifying file content to remove deprecations before linting is finalized.

Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Updates `cli/src/commands/migrate.rs` to expose `migrate_source` publicly.
Updates `cli/src/commands/lint.rs` to consume `migrate_source` when the `--fix` flag is true, conditionally modifying file content to remove deprecations before linting is finalized.

Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com>
@Tcode-Motion
Tcode-Motion marked this pull request as ready for review September 8, 2026 16:17
@Tcode-Motion
Tcode-Motion merged commit f79d808 into main Sep 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant