-
Notifications
You must be signed in to change notification settings - Fork 42
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
Incorrect warning: duplicate element id #170
Comments
I launch the |
I’m having same issue and get same result as #170 (comment) |
Sorry for my slow response 🙇 @wata Could you share your storyboard file facing this issue? |
I test again, Xcode 12.5, IBDecodable version to 0.4.0 or 0.4.2 and no issue |
Thanks for your response. This is the actual file. |
@wata Thank you! However I couldn't reproduce the incorrect warning... 😢 What I tried is below. I tried this for master revision and the latest distributed version.
|
My result: $ ls -a
.iblinter.yml
SignIn.storyboard
$ cat .iblinter.yml
enabled_rules:
- misplaced
- view_as_device
- image_resources
excluded:
- Pods
view_as_device_rule:
device_id: retina5_9
$ iblinter version
0.4.26
$ iblinter
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id iYo-8I-qsd
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 7jp-cj-Jfa
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id E8n-kU-Q5C
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id L4O-JP-FdO
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Pnf-U7-Bf2
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id h6f-C9-KfF
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id nLy-az-dV5
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id oWg-9E-n1j
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id vQt-en-xID
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Nua-db-AEm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id JQk-rB-6c4
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id ugH-V1-KiJ
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id DBz-aR-sRp
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id OJa-3Q-x62
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 4qb-fh-kEd
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id vUP-Il-T7s
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id IfF-Ux-ccf
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id aUY-ad-dXj
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id L3f-4j-PFL
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 8fl-6F-IT8
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 8tB-gl-Bzn
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id TtQ-0E-1RQ
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Y9A-8a-Q6E
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id cnK-2q-oAm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id gxV-NN-gNj
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 9SU-qi-UFm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 94x-Bh-O82
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id iYo-8I-qsd
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 7jp-cj-Jfa
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id E8n-kU-Q5C
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id L4O-JP-FdO
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Pnf-U7-Bf2
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id h6f-C9-KfF
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id nLy-az-dV5
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id oWg-9E-n1j
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id vQt-en-xID
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Nua-db-AEm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id JQk-rB-6c4
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id ugH-V1-KiJ
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id DBz-aR-sRp
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id OJa-3Q-x62
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 4qb-fh-kEd
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id vUP-Il-T7s
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id IfF-Ux-ccf
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id aUY-ad-dXj
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id L3f-4j-PFL
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 8fl-6F-IT8
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 8tB-gl-Bzn
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id TtQ-0E-1RQ
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Y9A-8a-Q6E
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id cnK-2q-oAm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id gxV-NN-gNj
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 9SU-qi-UFm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id ar7-62-iKJ
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id iYo-8I-qsd
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 7jp-cj-Jfa
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id E8n-kU-Q5C
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id L4O-JP-FdO
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Pnf-U7-Bf2
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id h6f-C9-KfF
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id nLy-az-dV5
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id oWg-9E-n1j
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id vQt-en-xID
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Nua-db-AEm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id JQk-rB-6c4
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id ugH-V1-KiJ
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id DBz-aR-sRp
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id OJa-3Q-x62
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 4qb-fh-kEd
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id vUP-Il-T7s
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id IfF-Ux-ccf
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id aUY-ad-dXj
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id L3f-4j-PFL
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 8fl-6F-IT8
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 8tB-gl-Bzn
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id TtQ-0E-1RQ
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id Y9A-8a-Q6E
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id cnK-2q-oAm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id gxV-NN-gNj
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id 9SU-qi-UFm
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: warning: duplicate element id retina5_9
/Users/wata/tmp/2021-05-24/SignIn.storyboard:0:0: error: appIcon_blue not found |
@wata I'll investigate this more. Thanks for your report! FROM swift:5.4.0
WORKDIR /Workspace
RUN git clone https://github.com/IBDecodable/IBLinter.git .
RUN swift build
RUN swift test BTW could you tell me your OS version? In different versions of macOS, Swift uses different runtime, so it may be related. |
Thank you for investigating. My macOS is 11.3 (20E232). |
I got the reason for this problem. Context of Swift changesSwift 5.4 has a new dynamic-cast implementation rewritten from 5.3's one. This re-implementation includes refactoring and bug fixes, so there are some different behavior from 5.3. According to the document, SR-1999 is fixed from Swift 5.4. And the new implementation is shipped as a part of the Swift runtime library in macOS11.3.
IBLinter implementationWe have a part that depends on the incorrect cast behavior of SR-1999 in Swift 5.3. Even compiling the code with Swift 5.3 compiler, the new cast implementation reveals our wrong implementation on macOS11.3 because Swift uses the runtime library of not compiler-toolchain's one but the running OS's one. This is why I couldn't reproduce this issue on macOS 11.2.3, and your macOS 11.3 reveals this. I'll fix this issue this week. |
well done PR on IBDecodable merged |
IBlinter says
SignIn.storyboard:0:0: warning: duplicate element id 9SU-qi-UFm
. But in fact, there is only one element whose id is9SU-qi-UFm
. Is this the expected behavior?Version: 0.4.26
Using: Homebrew and CocoaPods - same result for both
.iblinter.yml:
Search Results for
9SU-qi-UFm
:<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" usesAttributedText="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9SU-qi-UFm">
<constraint firstItem="9SU-qi-UFm" firstAttribute="leading" secondItem="L3f-4j-PFL" secondAttribute="leading" id="TtQ-0E-1RQ"/>
<constraint firstItem="9SU-qi-UFm" firstAttribute="centerX" secondItem="L3f-4j-PFL" secondAttribute="centerX" id="Y9A-8a-Q6E"/>
<constraint firstItem="9SU-qi-UFm" firstAttribute="centerY" secondItem="L3f-4j-PFL" secondAttribute="centerY" id="cnK-2q-oAm"/>
<constraint firstAttribute="trailing" secondItem="9SU-qi-UFm" secondAttribute="trailing" id="gxV-NN-gNj"/>
<outlet property="descriptionsTextView" destination="9SU-qi-UFm" id="ar7-62-iKJ"/>
I have tried DuplicateIDRuleTests with the latest version of the source code, but it seems to be failing.
The text was updated successfully, but these errors were encountered: