Bug 1571308 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The integration of apilint with `mach lint` adds the `detail` section to the error message. This is unnecessary as the `detail` just contains the name of the method or class that is causing the error, this piece of information is already present in the file/line/column fields.

e.g. this:

```
/Users/asferro/workspace/mozilla-central/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeTelemetry.java
   71:25  error  Field-only classes should not be final for mocking.: None                                                                                                                                       failures (android-api-lint)
   71:25  error  Field-only classes need at least one constructor for mocking.: None                                                                                                                             failures (android-api-lint)
   75:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.: field public final String name                                                                                    failures (android-api-lint)
   80:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.: field public final long[] values                                                                                  failures (android-api-lint)
  104:21  error  Method missing threading annotation. Needs one of: @MainThread, @UiThread, @WorkerThread, @BinderThread, @AnyThread.: method public void onTelemetryReceived(@NonNull RuntimeTelemetry.Metric)  failures (android-api-lint)
```

should be:
```
/Users/asferro/workspace/mozilla-central/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeTelemetry.java
   71:25  error  Field-only classes should not be final for mocking.                                                                   failures (android-api-lint)
   71:25  error  Field-only classes need at least one constructor for mocking.                                                         failures (android-api-lint)
   75:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.                                          failures (android-api-lint)
   80:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.                                          failures (android-api-lint)
  104:21  error  Method missing threading annotation. Needs one of: @MainThread, @UiThread, @WorkerThread, @BinderThread, @AnyThread.  failures (android-api-lint)
``
The integration of apilint with `mach lint` adds the `detail` section to the error message. This is unnecessary as the `detail` just contains the name of the method or class that is causing the error, this piece of information is already present in the file/line/column fields.

e.g. this:

```
/Users/asferro/workspace/mozilla-central/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeTelemetry.java
   71:25  error  Field-only classes should not be final for mocking.: None                                                                                                                                       failures (android-api-lint)
   71:25  error  Field-only classes need at least one constructor for mocking.: None                                                                                                                             failures (android-api-lint)
   75:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.: field public final String name                                                                                    failures (android-api-lint)
   80:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.: field public final long[] values                                                                                  failures (android-api-lint)
  104:21  error  Method missing threading annotation. Needs one of: @MainThread, @UiThread, @WorkerThread, @BinderThread, @AnyThread.: method public void onTelemetryReceived(@NonNull RuntimeTelemetry.Metric)  failures (android-api-lint)
```

should be:
```
/Users/asferro/workspace/mozilla-central/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeTelemetry.java
   71:25  error  Field-only classes should not be final for mocking.                                                                   failures (android-api-lint)
   71:25  error  Field-only classes need at least one constructor for mocking.                                                         failures (android-api-lint)
   75:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.                                          failures (android-api-lint)
   80:29  error  Missing field type nullability annotation. Needs one of @Nullable, @NonNull.                                          failures (android-api-lint)
  104:21  error  Method missing threading annotation. Needs one of: @MainThread, @UiThread, @WorkerThread, @BinderThread, @AnyThread.  failures (android-api-lint)
```

Back to Bug 1571308 Comment 0