Closed Bug 1571308 Opened 5 years ago Closed 5 years ago

Apilint error message should not include `detail`

Categories

(GeckoView :: General, defect, P3)

Unspecified
All
defect

Tracking

(firefox69 wontfix, firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: agi, Assigned: agi)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

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)

Failures in apilint have a rule code so include that in the information from
the lint.

I need to land one patch of the series for another bug.

Keywords: leave-open
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b587b6fc7ee1
Don't include |detail| in apilint output. r=nalexander
Keywords: leave-open
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/56152ebae420
Use error code from apilint. r=nalexander
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

status-firefox69=wontfix because we don't need to uplift this apilint fix to Beta.

Assignee: nobody → agi
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: