0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00
Anki-Android/annotations/android/text/annotations.xml
David Allison 1cdd07d6d7 Allow JetBrains @Contract annotations
Contract annotations allow us to write contracts for methods such as:
"null -> true" (TextUtils.isEmpty()), this allows further lint warnings
on Android framework methods, which should be annotated, but aren't yet.

These should be written inline when possible, but we also include a
folder of annotations for our external libraries

Further instructions for external annotations are detailed in README.md
2020-05-14 20:48:36 -05:00

24 lines
1010 B
XML

<!--
Copyright (c) 2020 David Allison <davidallisongithub@gmail.com>
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
-->
<root>
<item name='android.text.TextUtils boolean isEmpty(java.lang.CharSequence)'>
<annotation name='org.jetbrains.annotations.Contract'>
<val name="value" val="&quot;null -&gt; true&quot;" />
<val name="pure" val="true" />
</annotation>
</item>
</root>