1
5 Comments

Ruby developers working with gitlab?

Anyone a ruby developer working with gitlab?

Are you working on a team or do you have any open source project?

Do you use rubopcop?

Do you use rubocop's auto-correct?

Did you customise rubocop in anyway, i.e. created .rubocop.yml file?

Did you integrate in into your workflow? in what manner? CI/git hook/IDE/..?

on October 7, 2020
  1. 2

    I run rubocop via a git-commit hook and/or VS code "Format File" on my machine. With a pre-commit hook, you can reject the commit if its not formatted correctly (or have it auto-fix what it can).

    im not sure why this flow needs to be tied with a CI service.

    1. 1

      Are you mostly working alone?
      if in a teams, how large?

      1. 1

        For ruby projects, it the teams were up to 5 people.
        I also use python at my day job where ~900 other engineers and we use the pre-commit hook strategy with a jenkins test.

        1. 1

          is there a particular way you distribute the git-commit hook?

          1. 1

            the flow we use for the ~500 git repos we manage is they all have a Makefile in them with simplied bash cmds for doing "standard" things like setting up the dev, running tests, etc.

            The make file either as part of "setup dev" env or as a separate cmd "make install-hooks" would setup git to attach the hooks.

            The hooks would be defined using the pre-commit.com OSS project which manages everything via a config file.

            For our larger repos, the githooks do a massive number of checks (like verify json is in the correct format, schema file are correct, yaml formats are valid, removes whitespace at ends of lines, etc.)

            You can see a few already made ruby git-hook projects here.