Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lint.sh script --fix flag #338

Merged
merged 1 commit into from
Jul 18, 2024
Merged

fix: lint.sh script --fix flag #338

merged 1 commit into from
Jul 18, 2024

Conversation

alexeagle
Copy link
Member

It was broken because it used the wrong file as the patch. See 7a14cfd#r144358642

Note, this might mean we should add some automated testing for lint.sh - but I'd rather spend time on the aspect lint command.


Changes are visible to end-users: no

Test plan

  • Manual testing; please provide instructions so we can reproduce:
example % ./lint.sh --fix --dry-run src:ts     
From bazel-out/darwin_arm64-fastbuild/bin/src/ts.AspectRulesLintESLint.out:

/private/var/folders/8n/7cfngjb106sgwb8mr1tytx700000gn/T/rules_lint_patcher-pgLeXz/_main/bazel-out/darwin_arm64-fastbuild/bin/src/file.ts
  7:1  error  Unnecessary try/catch wrapper  no-useless-catch

✖ 1 problem (1 error, 0 warnings)


From bazel-out/darwin_arm64-fastbuild/bin/src/ts.AspectRulesLintESLint.patch:
--- a/src/file.ts
+++ b/src/file.ts
@@ -1,5 +1,5 @@
 // this is a linting violation, and is auto-fixed under `--fix`
-const a: string = "a";
+const a = "a";
 console.log(a);
 
 // linting violation; not auto-fixable

It was broken because it used the wrong file as the patch.
See 7a14cfd#r144358642
Copy link
Member

@gregmagolan gregmagolan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦖

@alexeagle alexeagle merged commit d0bd08a into main Jul 18, 2024
8 checks passed
@alexeagle alexeagle deleted the fix_patch branch July 18, 2024 00:54
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.

2 participants