Code review vocabulary
What does LGTM mean in code review?
LGTM stands for “looks good to me.” A reviewer writes it on a pull request or code review to say they have read the change and are happy for it to merge.
The short answer
LGTM = “Looks good to me.” It is a reviewer’s approval. On GitHub or GitLab it usually appears as a comment next to the formal Approve action; in some teams the comment itself is the approval.
The term is widespread in open source and at large software companies. Google’s published code review guidelines, for example, use LGTM as the name for a reviewer’s approval.
How LGTM is used
LGTM is rarely just three letters. The words around it change what the reviewer is promising.
- “LGTM”
- Approved as it is. The reviewer has no blocking concerns and the change can merge.
- “LGTM with nits”
- Approved, with small optional suggestions. The author can fix them or merge without them.
- “LGTM once the tests pass”
- A conditional approval. The reviewer is happy with the code but expects a check to go green first.
- “LGTM for the API part”
- A partial approval. The reviewer only looked at, or only owns, one area of the change.
Related code review terms
- PTAL: Please take a look, or please take another look after the author pushed changes.
- nit: A minor, non-blocking suggestion such as naming or formatting.
- SGTM: Sounds good to me. Agreement with a plan or a reply, rather than approval of code.
- WIP: Work in progress. The change is not ready for a full review yet.
- ACK / NACK: Acknowledged, or not acknowledged. Common in open-source mailing lists as agreement or rejection.
What an LGTM should promise
An LGTM puts your name next to the change. If it breaks in production, the first question is often who approved it. A useful LGTM means you can say yes to each of these:
- You read the whole diff, not just the lines that changed, and the code around each change.
- You know what the change is supposed to do and checked that it does that.
- You looked at the failure paths: empty input, a missing record, a timeout, a retry.
- You checked that the tests would fail if the code were wrong.
- You would be comfortable maintaining this code if the author left tomorrow.
The opposite is a rubber-stamp LGTM: an approval given because the diff is long, the author is senior, or the tests are green. It feels fast, but it moves the review cost to whoever debugs the change later.
How to write a more useful LGTM
Say what you checked and what you did not. The author and later readers then know how much the approval covers.
LGTM. I checked the retry path and the migration rollback. I did not run the load test, so someone who owns the queue should confirm the batch size.
nit: rename `tmp` to `pendingJobs`, optional.LGTM on AI-generated code
Code from an AI assistant is usually fluent and well formatted, which makes an easy LGTM tempting. It can still call an API that does not exist, skip error handling, or solve a slightly different problem from the one you asked for.
Before approving it, start from the requirement rather than the code, and ask for the test that would prove it works.
Practice earning your LGTM.
LGTM (lgtmlab.com) is named after this approval. Review short pull requests, explain what you would block and why, and get feedback on your reasoning.