# Lint and Debug Workflow

## User goal

Linting helps instructors detect common authoring problems before conversion. This is useful in teaching teams where several people maintain source lessons.

## Minimal example

    library(tutorizeR)

    lint <- lint_source("lesson.qmd", strict = FALSE)
    print(lint)

## Strict conversion

    library(tutorizeR)

    report <- tutorize(
      input = "lesson.qmd",
      output_dir = tempdir(),
      assessment = "both",
      lint_strict = TRUE,
      overwrite = TRUE
    )

## Realistic installed example

    library(tutorizeR)

    example_dir <- system.file("examples", "example_course_module", package = "tutorizeR")
    source_file <- file.path(example_dir, "lesson-source.qmd")
    question_bank <- load_question_bank(file.path(example_dir, "question-bank"))

    lint <- lint_source(
      input = source_file,
      question_bank = question_bank,
      strict = FALSE
    )

    print(lint)

## Conversion reports

    write_tutorize_report(
      report,
      file.path(tempdir(), "conversion-report.json"),
      format = "json"
    )

Reports are useful in continuous integration and course release workflows because they record the generated output path, number of exercises, MCQs, warnings, and lint summary.

## Limits

Linting can detect structural issues, but it cannot judge whether a lesson is pedagogically effective. Generated reports should support instructor review, not replace it.

## Reproducibility checklist

    stopifnot(inherits(lint, "tutorize_lint_report"))