you are viewing a single comment's thread
view the rest of the comments
[–] 58 points 2 years ago (2 children)

At my workplace, we have a lint rule that reports an error if @nocommit is anywhere in the file, plus a commit hook that blocks all commits with @nocommit anywhere in them. It works well and has saved me a few times.

Works pretty well, except the lint rule and its associated tests have to do something like "@no"+"commit" to avoid triggering it,

  • source
  • hideshow 4 child comments
  • [–] 6 points 2 years ago (1 child)

    In a lot of modern work flows this is incompatible with the development pattern.

    For example, at my job we have to roll a test release through CI that we then have to deploy to a test kubernetes cluster. You can't even do that if the build is failing because of linting issues.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 10 points 2 years ago* (1 child)

    The test release shouldn't have anything marked with @nocommit though... The idea is that you use it to mark code that is only temporary local debugging code that should never be committed.

  • source
  • parent
  • hideshow 2 child comments