Skip to content

Instantly share code, notes, and snippets.

Sven Vidak mister11

Block or report user

Report or block mister11

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ExportedActivityDetector.kt
class ExportedActivityDetector : Detector(), Detector.XmlScanner {
override fun getApplicableAttributes() = listOf("exported")
override fun visitAttribute(context: XmlContext, attribute: Attr) {
if (attribute.isParentActivity() && attribute.value == "true") {
val location = context.getLocation(attribute)
context.report(
issue = ISSUE_EXPORTED_ACTIVITY,
scope = attribute,
View ExportedActivityDetectorTest.kt
class ExportedActivityDetectorTest {
private val validXmlFile = xml(
"AndroidManifest.xml",
"""
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.infinum.lint">
<application
android:allowBackup="true"
View Main.cpp
int main(int argc, char** argv) {
Point * p = new Point(1, 42);
cout << *p << endl;
return 0;
}
You can’t perform that action at this time.