Open Bug 1541865 Opened 7 years ago Updated 3 years ago

Stand up a "tools/herald" instance of mozlint

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: ahal, Unassigned)

References

(Blocks 1 open bug)

Details

We want the ability to perform checks that are only based on the files modified in a push (e.g in hg outgoing). For example:

  • Check if appropriate reviewers were added based on touched files.
  • Check if documentation/changelogs were updated when appropriate.
  • Check if third_party code is being modified
  • etc

These would be similar to phabricator's herald rules, though herald has been deemed too slow to be viable for all of the use cases we want to implement (it would make all these checks happen at review submit time).

The existing tools/lint infrastructure isn't a great fit for these kinds of checks because those linters operate across the entire source tree, whereas these linters depend only on the files modified. However the underlying mozlint library should be able to support these kinds of things relatively easily.

I'm proposing we create a separate mozlint instance that lives in a different directory. The main difference from this new instance would be that rather than allowing users to specify which paths to lint on the cli, we would automatically seed mozlint with the files touched.

Type: defect → enhancement

Is "herald" the right name here? I'm not sure if there's an industry standard term for these types of checks. Maybe hooks?

Blocks: 1529760

(In reply to Andrew Halberstadt [:ahal] from comment #1)

Is "herald" the right name here? I'm not sure if there's an industry standard term for these types of checks. Maybe hooks?

Yeah, never heard of a standard term for this. Most projects that do similar things on GitHub call them "checks" or "rules".

ahal: snorp from the Geckview team brought this bug to our attention in the context of Geckoview bugs that are important to their team. Do you know how much engineering effort this would take to implement? (Please note I'm not asking anyone to implement anything right now, I'm just looking for an estimate of work)

Flags: needinfo?(ahal)

I'd conservatively budget a month for myself or someone intimately familiar with mozlint. Longer if the person implementing it doesn't have that experience.

I know you aren't asking anything yet, but just want to note that I likely won't be able to work on this anytime soon. Though I can help with guidance / reviews.

Flags: needinfo?(ahal)
Priority: -- → P3
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.