You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duplicate targets are going to have the same text and therefore share the same auto-fixes which breaks the way our autofixer works. The autofixer should track line numbers and use that to differentiate the targets.
In other words, if a duplicate target has exactly the same text as its predecessor then they will share their fixes, which isn't really what we want since if the first fix is to delete as a duplicate, it might delete both! A TODO is in place to look at addressing this by using both text and line number to apply the correct fix.
## Summary:
This adds support for configuration files so that we don't have to supply all options on the command line.
It also adds test coverage for our output sink class and some other light tweaks.
This is the last piece for CheckSync v3! (Though I may try addressing #666)
Note to reviewers:
Much of this diff is test and snapshots updates. I recommend filtering out `.snap` files and skipping over `_test.js` files to look at the JSON and JS file changes.
Fixes#664
## Test plan:
`yarn test`
`yarn flow`
Author: somewhatabstract
Reviewers: somewhatabstract, kevinbarabash, jeremywiebe
Required Reviewers:
Approved By: kevinbarabash
Checks: ⚪️ CodeQL, ✅ codecov/project, ✅ Test and build (macOS-latest, 16.x), ✅ Test and build (macOS-latest, 14.x), ✅ Test and build (macOS-latest, 12.x), ✅ Test and build (ubuntu-latest, 16.x), ✅ Test and build (ubuntu-latest, 14.x), ✅ Test and build (ubuntu-latest, 12.x), ✅ Test and build (windows-latest, 16.x), ✅ Test and build (windows-latest, 14.x), ✅ Test and build (windows-latest, 12.x), ✅ Integration tests (windows-latest, 16.x), ✅ Integration tests (windows-latest, 14.x), ✅ Integration tests (windows-latest, 12.x), ✅ Integration tests (macOS-latest, 16.x), ✅ Integration tests (macOS-latest, 14.x), ✅ Integration tests (macOS-latest, 12.x), ✅ Integration tests (ubuntu-latest, 16.x), ✅ Integration tests (ubuntu-latest, 14.x), ✅ Integration tests (ubuntu-latest, 12.x), ✅ Analyze (javascript), ✅ Lint and flow check (ubuntu-latest, 16.x), ✅ Update test coverage (ubuntu-latest, 16.x), ⏭ dependabot
Pull Request URL: #812
Duplicate targets are going to have the same text and therefore share the same auto-fixes which breaks the way our autofixer works. The autofixer should track line numbers and use that to differentiate the targets.
In other words, if a duplicate target has exactly the same text as its predecessor then they will share their fixes, which isn't really what we want since if the first fix is to delete as a duplicate, it might delete both! A TODO is in place to look at addressing this by using both text and line number to apply the correct fix.
See
checksync/src/fix-file.js
Lines 75 to 79 in d96418a
The text was updated successfully, but these errors were encountered: