Skip to main content
Sign in
Snippets Groups Projects

Add merge request CI for linting

  • View options
  • Closed created by henry
    Closed Add merge request CI for linting
    • View options
  • There has been some talk of using gitlab CI to automatically lint test merge requests.

    I wouldn't mind putting this together, using the existing tb-dev script to do some lint checking.

    But there are a few things to figure out:

    • Gitlab runs the script in a container, so we would need a way to set up the environment so that ./mach lint would run. Gitlab also allows caching of files between runs, so we should figure out which files can be cached to speed up the set up.
    • What lints do we not want? "license" and "android-*", but anything else?
    • Sometimes the linter needs to pull in updates before it starts, but then fails to lint. How do we avoid this?
    • Which files should we check by default? I'm guessing only the files that have some change in the given merge request.
    • Any files that should always be excluded?
    • We want the linter to run for our own files, but what about when we modify a mozilla-central file?
    • We need to get the linter happy with our current code!
    • Do we want it to run automatically with each push, or only manually?
    • If you want to target the next ESR branch, you have to do two separate things: 1 rebase to the new branch and push, and 2 change the branch target in the merge request. There is a window of time between these two operations where gitlab thinks you are adding a very large number of commits, and these can happen in either order. So without any prevention, it would start lint checking a very large number of files.

    Anyone have any suggestions? Or anything else we would need to figure out?

    /cc @pierov @ma1 @clairehurst @dan @richard

    Attributes

    Assignees

    Labels

    Milestone

    None

    Dates

    Start: None

    Due: None

    Time tracking

    No estimate or time spent
    To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first