-
Notifications
You must be signed in to change notification settings - Fork 7
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
INTL-1332: Add import smarts to codemod #241
Merged
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
59475a6
INTL-1332: Updated code for Intl class import statement
chetansinghchoudhary-wk f169e23
INTL-1332: Minor changes in import format
chetansinghchoudhary-wk 5e38c29
INTL-1332: minor change in condition
chetansinghchoudhary-wk 78fcfe6
INTL-1332: minor change in import
chetansinghchoudhary-wk afdedc3
Added test case for importer
chetansinghchoudhary-wk 2765fc3
INTL-1332: PR comment resolved
chetansinghchoudhary-wk fd61b49
INTL-1332: order change for testcase
chetansinghchoudhary-wk 6d20e1f
INTL-1332: minor changes in test case
chetansinghchoudhary-wk 2556824
INTL-1332: Updated the migration and importer_test file
chetansinghchoudhary-wk 120193c
INTL-1332: Updated the order of imports
chetansinghchoudhary-wk ae1c9d5
INTL-1332: Updated test cases
chetansinghchoudhary-wk 2563523
INTL-1332: Updated test case
chetansinghchoudhary-wk b61886a
INTL-1332: Updated test case
chetansinghchoudhary-wk dc10e48
INTL-1332: Updated test case
chetansinghchoudhary-wk 3f9c44b
INTL-1332: Added custom input
chetansinghchoudhary-wk fb41781
INTL-1332: Added custom input
chetansinghchoudhary-wk 31586e8
INTL-1332: format & align
chetansinghchoudhary-wk f5a39f2
INTL-1332: format & align
chetansinghchoudhary-wk f0b8d70
INTL-1332: format & align
chetansinghchoudhary-wk 32c85b4
INTL-1332: minor changes
chetansinghchoudhary-wk 9659774
INTL-1332: minor changes
chetansinghchoudhary-wk 04a2930
INTL-1332: format code
chetansinghchoudhary-wk 0b2cf66
INTL-1332: format code
chetansinghchoudhary-wk e4e1e70
INTL-1332: indentation updated
chetansinghchoudhary-wk 19a9987
INTL-1332: formated the code
chetansinghchoudhary-wk cee0c09
INTL-1332: formated the code
chetansinghchoudhary-wk 30a4069
INTL-1332: indentation the code
chetansinghchoudhary-wk dce91a9
INTL-1332: added extraInput
chetansinghchoudhary-wk 440bfe4
INTL-1332: added extraInput function
chetansinghchoudhary-wk 951515b
INTL-1332: updated test case
chetansinghchoudhary-wk c22d80c
Change order for import file
chetansinghchoudhary-wk a6453be
Remove intlImport
chetansinghchoudhary-wk b8b9fbc
Remove intlImport & format
chetansinghchoudhary-wk 6ac09fd
order change
chetansinghchoudhary-wk 2bdc01f
Minor changes
chetansinghchoudhary-wk 5fa051f
Minor changes in expectedSecondoutput
chetansinghchoudhary-wk 10e38b3
Updated test case
chetansinghchoudhary-wk ff158cc
Optimized the code and updated the test cases
chetansinghchoudhary-wk 7b8cfa7
Minor update in import
chetansinghchoudhary-wk 8865e1c
Updated the importer class
chetansinghchoudhary-wk 8e4228f
INTl-1332: Test case issue resolve and update
akshaybhardwaj-wk 4fdcd8a
INTL-1332: remove print
akshaybhardwaj-wk 683240c
INTL-1322: Test case debug
akshaybhardwaj-wk d38b84e
INTL-1322: relative import test case debug
akshaybhardwaj-wk cefb0ca
INTL-1322: Test case debug
akshaybhardwaj-wk 9acf12f
INTL-1332: PR comment resolve
akshaybhardwaj-wk 81bb028
INTL:1332: resolve case for no import
akshaybhardwaj-wk 6e8156b
INTl-1332: Code refactor for bool
akshaybhardwaj-wk 1efc33d
INTL-1332: Resolve PR comment
akshaybhardwaj-wk a4c3f5f
INTL-1332: undo PR commet
akshaybhardwaj-wk cc04546
INTL-1332: Resolve PR comment intlURL
akshaybhardwaj-wk 2c70a40
INTL-1322: Skynet issue resolve
akshaybhardwaj-wk 41dcf37
Merge branch 'master' into INTL-1332
akshaybhardwaj-wk eaa80fd
INTL-1322: URI content to uri.stringValue
akshaybhardwaj-wk bf17566
INTL-1332: run dart format
akshaybhardwaj-wk 5aea1b7
INTL-1332: New test cases added PR comment
akshaybhardwaj-wk 34187cd
INTL-1332: New test cases added PR comment
akshaybhardwaj-wk 4207f2e
INTL-1332: contex.root and test case space update
akshaybhardwaj-wk cc34f33
INTL-1332: uri scheme updated
akshaybhardwaj-wk aa6fa7b
INTL-1332: code refactor in loop
akshaybhardwaj-wk f84c1a2
INTl-1332: Run format
akshaybhardwaj-wk 4af088b
INTL-1332: Move code outer loop
akshaybhardwaj-wk 5f4096b
INTl-1322: Updated test case for dart and package both
akshaybhardwaj-wk 29c4829
INTL-1332: update test case and check for package and dart both
akshaybhardwaj-wk a926209
INTl-1332: apply dart format
akshaybhardwaj-wk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close. But these lines are not necessary This is taking something that returns a Uri, turning it into a string, then parsing it so you can ask it for its scheme. Just get the uri and check if it's null and check the scheme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, we are writing code like this
final uriContent = importDirective.uriContent;
but after merge conflicts resolve there is updating in Analyzer 5
uriContent
is archived and we are usingimportDirective.uri.stringValue
and if we check scheme with uri like this
then it's giving error
error: The getter 'scheme' isn't defined for the type 'StringLiteral'. (undefined_getter at [over_react_codemod] lib/src/intl_suggestors/intl_importer.dart:158)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. My mistake. I assumed importDirective.uri was returning a Uri, since we needed to convert it to a string. It's a StringLiteral, so this code is good.