File tree 2 files changed +3
-3
lines changed
main/java/com/example/google/lint
test/java/com/example/google/lint
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ public class MainActivityDetector extends ResourceXmlDetector implements Detecto
63
63
Severity .ERROR ,
64
64
new Implementation (
65
65
MainActivityDetector .class ,
66
- EnumSet . of ( Scope .MANIFEST ) ));
66
+ Scope .MANIFEST_SCOPE ));
67
67
68
68
/**
69
69
* This will be <code>true</code> if the current file we're checking has at least one activity.
@@ -104,7 +104,7 @@ public void afterCheckProject(@NonNull Context context) {
104
104
&& mManifestLocation != null ) {
105
105
if (!mHasActivity ) {
106
106
context .report (ISSUE , mManifestLocation ,
107
- "Expecting " + ANDROID_MANIFEST_XML + " to have an <" + TAG_APPLICATION +
107
+ "Expecting " + ANDROID_MANIFEST_XML + " to have an <" + TAG_ACTIVITY +
108
108
"> tag." );
109
109
} else if (!mHasLauncherActivity ) {
110
110
// Report the issue if the manifest file has no activity with a launcher intent.
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ public void testMissingMainActivity() throws Exception {
140
140
public void testMissingApplication () throws Exception {
141
141
mEnabled = Collections .singleton (MainActivityDetector .ISSUE );
142
142
String expected = "AndroidManifest.xml: Error: Expecting AndroidManifest.xml to have an " +
143
- "<application > tag. [MainActivityDetector]\n " +
143
+ "<activity > tag. [MainActivityDetector]\n " +
144
144
"1 errors, 0 warnings\n " ;
145
145
String result = lintProject (xml (FN_ANDROID_MANIFEST_XML , "" +
146
146
"<?xml version=\" 1.0\" encoding=\" utf-8\" ?>\n " +
You can’t perform that action at this time.
0 commit comments