Skip to content

Draft: Add lefthook config

Dmitry Gruzd requested to merge add-lefthook-config into master

What does this MR do?

This MR adds an initial Lefthook config for gitlab.

It adds a couple of backend hooks:

  • pre-commit:
    • rubocop on staged files
  • pre-push:
    • rubocop on files changed against the main branch
    • bin/rake gitlab:sidekiq:all_queues_yml:check

Additionally, it adds lefthook run lint with bin/rake gettext:lint. The idea is to add long-running tasks under this section, it would be unpractical to run those in pre-push hooks.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Dmitry Gruzd

Merge request reports

Loading