Configuration

Configuration is .github/lgtm.yml, read from the base branch so a pull request cannot exempt itself. Every field is optional, and the file below is the default.

# How many questions to ask. 1 to 5.
questions: 2
 
# easy   - distractors are obviously unrelated
# medium - distractors are true about the diff but don't answer the question
# hard   - distractors are the plausible misreading
difficulty: medium
 
# List the docs and links a reviewer needs, above the questions.
surfaceReading: true
 
# Also link out to explainers for concepts the diff assumes you know.
# Uses web search. Ignored when surfaceReading is off.
webConcepts: true
 
# Let reviewers ask questions by mentioning @lgtm in a PR comment.
answerQuestions: true
 
# Off means the check is reported but never holds a merge.
enforce: false
 
# Never quizzed about. Generated files are already excluded without being listed.
exemptPaths: []
 
# Never quizzed. Bots are always exempt regardless.
exemptReviewers: []

Fields

Field Default
questions 2 1 to 5. Raising it deepens the quiz rather than reshuffling it.
difficulty medium Changes how close the distractors sit to the answer, never which answer is correct.
surfaceReading true List the docs and links the reviewer needs, above the questions.
webConcepts true Also link web explainers for concepts the diff assumes. Uses web search.
answerQuestions true Let people with write access ask questions by mentioning @lgtm.
enforce false Whether an unanswered quiz holds the merge. See enforcing.
exemptPaths [] Globs never quizzed about, on top of the built-in generated-file set.
exemptReviewers [] Logins never quizzed. Bots always are.

Lockfiles, dist/, vendor/, *.pbxproj and their kin are never quizzed, and do not need listing in exemptPaths.

A malformed field cannot break you

Validation is total. A malformed field falls back to its default and is reported in the check output. A typo can neither silently disable enforcement nor block every merge, which are the two ways a configuration file usually hurts.

The same file configures the command line

sp lgtm reads this file too, so a repository is configured once. Two fields matter only there:

provider: anthropic   # anthropic | openai | gemini, or vendor:model
verifier: openai      # optional, defaults to the proposer

Fields that mean something only to the Action, which is enforce, webConcepts, surfaceReading, answerQuestions and exemptReviewers, are parsed and ignored by the command line rather than reported as errors. The file is shared, and complaining about a field that is correct for its real consumer would be noise.