Commit 6ab25ce
authored
Use correct start indices in ModulePositionScanner (#3207)
* Test the root cause of #3206
* Reproduce #3206 as rewrite test
* Use correct start indices in ModulePositionScanner
`ModulePositionScanner` currently reports wrong substring positions if
an an artifactId is a proper substring of a groupId. With this change,
regex capturing groups are used to get the correct start indices of
substring positions of `ModulePositions`.
* Reformat test1 parent 7f380e0 commit 6ab25ce
File tree
3 files changed
+45
-26
lines changed- modules/core/src
- main/scala/org/scalasteward/core/edit/update
- test/scala/org/scalasteward/core/edit
- update
3 files changed
+45
-26
lines changedLines changed: 12 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
Lines changed: 19 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | | - | |
| 893 | + | |
| 894 | + | |
894 | 895 | | |
895 | 896 | | |
896 | 897 | | |
897 | 898 | | |
898 | 899 | | |
899 | 900 | | |
900 | | - | |
901 | | - | |
| 901 | + | |
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
905 | | - | |
906 | | - | |
| 905 | + | |
907 | 906 | | |
908 | 907 | | |
909 | 908 | | |
910 | | - | |
911 | | - | |
| 909 | + | |
912 | 910 | | |
913 | 911 | | |
914 | 912 | | |
915 | | - | |
916 | | - | |
| 913 | + | |
917 | 914 | | |
918 | 915 | | |
919 | 916 | | |
920 | 917 | | |
921 | | - | |
| 918 | + | |
| 919 | + | |
922 | 920 | | |
923 | 921 | | |
924 | 922 | | |
925 | 923 | | |
926 | 924 | | |
927 | 925 | | |
928 | | - | |
929 | | - | |
| 926 | + | |
930 | 927 | | |
931 | 928 | | |
932 | 929 | | |
933 | 930 | | |
934 | 931 | | |
935 | 932 | | |
936 | | - | |
937 | | - | |
| 933 | + | |
938 | 934 | | |
939 | 935 | | |
940 | 936 | | |
941 | 937 | | |
942 | 938 | | |
943 | 939 | | |
944 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
945 | 950 | | |
946 | 951 | | |
947 | 952 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
36 | 50 | | |
0 commit comments