Hey all! My team at work is struggling with growing pains of getting into a formalized review process, so I was wondering if any of you guys have some things to live or die by in your code reviews. How much of it is manual, or how much is just static code analysis + style guide stuff, etc?

  • reversebananimals@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 years ago

    I’m a senior at a large tech company - I push all the teams I work with to automate the review process as much as possible. At minimum, teams must have a CI hook on their pull request process that runs a remote dryrun build of the changed packages. The dryrun makes sure the packages compile, pass unit tests and meet linter rules. A failed build blocks the pull request from being merged.

    I try to encourage developers to turn the outcome of every code style discussion into a lint rule that fails the dryrun build when its violated.

  • pnelego@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 years ago

    Small startup - Here is our process

    • Create your branch
    • Implement feature
    • Test independently of other components (with unit tests or otherwise)
    • Test directly with other componenets
    • Work with other devs to ensure stability on dev branch, make any small bug fixes directly in dev branch
    • Push to prod
  • cark@beehaw.org
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 years ago

    Current place:

    • Work is done on a feature branch on a personal fork of the repo
    • Codebase requires 100% functional coverage, and you’re responsible for writing the tests for your code and including that in the same PR
    • Run pre-commit hooks for style auto-formatters before you can commit and push your code to your origin fork
    • Ideally run local tests as well
    • Create a PR to pull feature branch into the upstream repo’s main branch, which triggers the CI pipeline for style and tests
    • At least 1 other person must review the code before a PR can be approved and merged into upstream main
    • There’s a separate CI pipeline for testing of publishing the packages to TestPyPI
    • Releases to PyPI are currently done manually