-
-
Notifications
You must be signed in to change notification settings - Fork 712
Closed
Closed
Incorrect handling of
SS in copyrights#3667Labels
Description
Description
Having a SS in a copyright line throws off the parser and yields unexpected results.
How To Reproduce
>> ">>>> from scancode import api
>>> api.get_copyrights("androidx.appcompat_appcompat_1.6.1/res/color-v23/abc_tint_btn_checkable.xml")
{'copyrights': [{'copyright': 'Copyright (c) 2016SS The Android Open Source Project', 'start_line': 3, 'end_line': 3}], 'holders': [{'holder': '2016SS The Android Open Source Project', 'start_line': 3, 'end_line': 3}], 'authors': []}
>>>
>>> api.get_copyrights("androidx.appcompat_appcompat_1.6.1/res/color-v23/abc_tint_btn_checkable.xml")
{'copyrights': [{'copyright': 'Copyright (c) 2016SS The Android Open Source Project', 'start_line': 3, 'end_line': 3}], 'holders': [{'holder': '2016SS The Android Open Source Project', 'start_line': 3, 'end_line': 3}], 'authors': []}
>>>
The corresponding XML file is:
xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="?attr/colorControlNormal" android:alpha="?android:disabledAlpha"/>
<item android:state_checked="true" android:color="?attr/colorControlActivated"/>
<item android:color="?attr/colorControlNormal"/>
selector>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="?attr/colorControlNormal" android:alpha="?android:disabledAlpha"/>
<item android:state_checked="true" android:color="?attr/colorControlActivated"/>
<item android:color="?attr/colorControlNormal"/>
selector>
System configuration
- What OS are you running on? Ubuntu 22.04
- What version of scancode-toolkit was used to generate the scan file? 32.0.8
- What installation method was used to install/run scancode? pip