You are viewing a single thread.
View all comments
0 points

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,

permalink
report
reply
0 points

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.

permalink
report
parent
reply
0 points
*

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.

permalink
report
parent
reply
0 points

Are you committing to master? I don’t see any reason why you shouldn’t commit your debugging code to your own branch. Obviously clean it up before merging

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5.4K

    Monthly active users

  • 887

    Posts

  • 9K

    Comments

Community moderators