# Checks

Every check Kapi runs on a course, with its severity, the course types it runs for and what it says.

Kapi's checker reads a course, then runs every check on it. Works Studio, Kapi's server and [Check a course](https://docs.kapiworks.com/build/check) all run the same code, checker 2.2.0. A course's type adds the checks listed on [its page](https://docs.kapiworks.com/build).

## Severity

* **Error**: it blocks approval until it is fixed.
* **Warning**: it does not block approval. The approver sees it.
* **Tip**: advice. It does not block approval.

Some checks are stricter in a course Kapi makes from your documents. Each check's page says so.

## A finding

The checker reports `kapi.works.check/2`. Each finding has:

* `code`: the check, such as `feedback_missing`. A code keeps its meaning.
* `severity`: `error`, `warning` or `tip`.
* `where`: the `file`, a JSON Pointer to the place in it, and the page, question or text it concerns.
* `message`: what is wrong, in words for people.
* `fixes`: when Kapi knows the fix, the change to make.
* `docs`: the address of the check's page here.

In Works Studio, **Let Kapi fix** takes the findings it can fix: those to write or change, apart from tips, the choices that are yours and quotes that need your documents.

## Every check

| Check | Severity | Course type | What Kapi says |
| --- | --- | --- | --- |
| [`file_not_allowed`](https://docs.kapiworks.com/build/reference/checks/file-not-allowed) | Error | Every type | This file isn't a file a package holds. Remove it, or move it where the docs say it goes. |
| [`unsafe_path`](https://docs.kapiworks.com/build/reference/checks/unsafe-path) | Error | Every type | This path isn't safe. Use lower-case relative paths with no "..", backslashes or hidden parts. |
| [`file_type`](https://docs.kapiworks.com/build/reference/checks/file-type) | Error | Every type | This file isn't the kind of file its place says. Kapi reads a file's first bytes, not its name. |
| [`not_utf8`](https://docs.kapiworks.com/build/reference/checks/not-utf8) | Error | Every type | This file isn't saved as UTF-8 text. Save it again as UTF-8. |
| [`json_invalid`](https://docs.kapiworks.com/build/reference/checks/json-invalid) | Error | Every type | This file isn't valid JSON. |
| [`schema_invalid`](https://docs.kapiworks.com/build/reference/checks/schema-invalid) | Error | Every type | This value should be as the format says. |
| [`unknown_key`](https://docs.kapiworks.com/build/reference/checks/unknown-key) | Error | Every type | "…" isn't part of the format. Remove it, or check its spelling. |
| [`file_missing`](https://docs.kapiworks.com/build/reference/checks/file-missing) | Error | Every type | The package needs this file. |
| [`over_limit`](https://docs.kapiworks.com/build/reference/checks/over-limit) | Error | Every type | This is over the limit of …. |
| [`family_not_available`](https://docs.kapiworks.com/build/reference/checks/family-not-available) | Error | Every type | Kapi doesn't have a … player yet. Courses play today. |
| [`sdk_too_new`](https://docs.kapiworks.com/build/reference/checks/sdk-too-new) | Error | Every type | The package needs a newer SDK than Kapi serves. Kapi serves SDK …. |
| [`player_line_unknown`](https://docs.kapiworks.com/build/reference/checks/player-line-unknown) | Error | Every type | There's no such player line. Use …. |
| [`id_duplicate`](https://docs.kapiworks.com/build/reference/checks/id-duplicate) | Error | Every type | The … ID is used twice. Every ID must be unique. |
| [`reference_unknown`](https://docs.kapiworks.com/build/reference/checks/reference-unknown) | Error | Every type | This names …, which the package doesn't declare. |
| [`role_default_missing`](https://docs.kapiworks.com/build/reference/checks/role-default-missing) | Error | Every type | Mark exactly one role as the default, for people whose job role isn't mapped. |
| [`word_missing`](https://docs.kapiworks.com/build/reference/checks/word-missing) | Error | Every type | The words file has no text for …. |
| [`word_owner`](https://docs.kapiworks.com/build/reference/checks/word-owner) | Error | Every type | …'s first part names nothing in the package. Start a text ID with its lesson, page or question ID, or course, common, role or assessment. |
| [`word_unused`](https://docs.kapiworks.com/build/reference/checks/word-unused) | Warning | Every type | … isn't used anywhere. Remove it, or use it. |
| [`markup_not_allowed`](https://docs.kapiworks.com/build/reference/checks/markup-not-allowed) | Error | Every type | These words use …. Words take only **strong**, _emphasis_, [label](https://host/path) links and line breaks. |
| [`link_not_https`](https://docs.kapiworks.com/build/reference/checks/link-not-https) | Error | Every type | The link to … must start with https://. |
| [`link_host_undeclared`](https://docs.kapiworks.com/build/reference/checks/link-host-undeclared) | Error | Every type | These words link to …, which kapi-works.json doesn't list in links. Add the host if people may open it. |
| [`placeholder_unknown`](https://docs.kapiworks.com/build/reference/checks/placeholder-unknown) | Error | Every type | … isn't a placeholder Kapi fills. Use {company.name}, {contacts.<key>.name}, .email, .phone, .url or {learner.firstName}. |
| [`placeholder_undeclared`](https://docs.kapiworks.com/build/reference/checks/placeholder-undeclared) | Error | Every type | These words use a placeholder, but kapi-works.json doesn't declare … in context. |
| [`placeholder_in_link`](https://docs.kapiworks.com/build/reference/checks/placeholder-in-link) | Error | Every type | A link address can't hold a placeholder. Kapi checks every address before a learner opens it. |
| [`first_name_twin_missing`](https://docs.kapiworks.com/build/reference/checks/first-name-twin-missing) | Error | Every type | These words use {learner.firstName}, so they need a twin, …, for people whose first name isn't given. |
| [`contact_missing_word`](https://docs.kapiworks.com/build/reference/checks/contact-missing-word) | Error | Every type | This contact is optional, so write … for companies that haven't filled it in. |
| [`claim_word`](https://docs.kapiworks.com/build/reference/checks/claim-word) | Warning | Every type | "…" is a claim Kapi can't stand behind. Say what the course does instead. |
| [`closing_names_ending`](https://docs.kapiworks.com/build/reference/checks/closing-names-ending) | Warning | Every type | The closing words name "…". Endings are the company's rules, so the closing should only say the learning is finished. |
| [`answer_key_invalid`](https://docs.kapiworks.com/build/reference/checks/answer-key-invalid) | Error | Every type | The answer key …. |
| [`explanation_missing`](https://docs.kapiworks.com/build/reference/checks/explanation-missing) | Error | Every type | This question has no explanation of why the answer is right. |
| [`feedback_missing`](https://docs.kapiworks.com/build/reference/checks/feedback-missing) | Error | Every type | Choice … has no feedback. Every choice says why it's right or wrong. |
| [`held_question_on_page`](https://docs.kapiworks.com/build/reference/checks/held-question-on-page) | Error | Every type | This question is in …'s pool, so it can't also sit on a page. Kapi's test would show it again. |
| [`held_kind_not_allowed`](https://docs.kapiworks.com/build/reference/checks/held-kind-not-allowed) | Error | Every type | Kapi's test takes choice and multi questions only. |
| [`pool_too_small`](https://docs.kapiworks.com/build/reference/checks/pool-too-small) | Error | Every type | The pool holds fewer questions than the test draws (…). |
| [`pool_small`](https://docs.kapiworks.com/build/reference/checks/pool-small) | Warning | Every type | The pool holds less than one and a half times the draw (…), so retakes repeat questions. |
| [`question_unused`](https://docs.kapiworks.com/build/reference/checks/question-unused) | Warning | Every type | No page or pool uses this question. |
| [`media_file_missing`](https://docs.kapiworks.com/build/reference/checks/media-file-missing) | Error | Every type | The package has no file …. |
| [`media_sha256_mismatch`](https://docs.kapiworks.com/build/reference/checks/media-sha256-mismatch) | Error | Every type | This file's SHA-256 doesn't match the one kapi-works.json lists for it. Use the file it lists, or list this file's SHA-256. |
| [`media_not_listed`](https://docs.kapiworks.com/build/reference/checks/media-not-listed) | Error | Every type | This media file isn't listed in kapi-works.json. |
| [`alt_missing`](https://docs.kapiworks.com/build/reference/checks/alt-missing) | Error | Every type | This picture needs alt text, or mark it decorative. |
| [`captions_missing`](https://docs.kapiworks.com/build/reference/checks/captions-missing) | Error | Every type | Sound or video with speech needs captions. |
| [`media_too_large`](https://docs.kapiworks.com/build/reference/checks/media-too-large) | Error | Every type | This file is over 25 MB, the most a page can carry. Make it smaller. |
| [`context_not_allowed`](https://docs.kapiworks.com/build/reference/checks/context-not-allowed) | Error | Every type | … can't be required for customers. Kapi never gives it in a customer door. |
| [`starter_words_left`](https://docs.kapiworks.com/build/reference/checks/starter-words-left) | Error | Every type | The starter's sample words are still here (…). Replace them with your own. |
| [`starter_media_left`](https://docs.kapiworks.com/build/reference/checks/starter-media-left) | Error | Every type | This is still the starter's sample file. Replace it with your own. |
| [`support_missing`](https://docs.kapiworks.com/build/reference/checks/support-missing) | Warning | Every type | This answer key has no quote from a source in support.json. |
| [`support_target_unknown`](https://docs.kapiworks.com/build/reference/checks/support-target-unknown) | Error | Every type | support.json names …, which is neither a question nor a text in the package. |
| [`source_not_linked`](https://docs.kapiworks.com/build/reference/checks/source-not-linked) | Warning | Every type | Kapi can't check this quote until its source is linked to the draft. |
| [`quote_not_found`](https://docs.kapiworks.com/build/reference/checks/quote-not-found) | Error | Every type | This quote isn't in its source, word for word. |
| [`fact_not_in_source`](https://docs.kapiworks.com/build/reference/checks/fact-not-in-source) | Warning | Every type | … isn't in any source this cites. Check it against the source. |
| [`lesson_long`](https://docs.kapiworks.com/build/reference/checks/lesson-long) | Tip | Every type | This lesson runs about … minutes. People keep more from lessons of 4 to 7. |
| [`sentence_long`](https://docs.kapiworks.com/build/reference/checks/sentence-long) | Tip | Every type | … Shorter sentences are easier to read, especially in a second language. |
| [`few_situations`](https://docs.kapiworks.com/build/reference/checks/few-situations) | Tip | Every type | … Questions set in a situation check that people can use what they learned. |
| [`film_sdk`](https://docs.kapiworks.com/build/reference/checks/film-sdk) | Error | Every type | This package has a film, so kapi-works.json needs "sdk": "2.1". |
| [`narration_placeholder`](https://docs.kapiworks.com/build/reference/checks/narration-placeholder) | Error | Every type | Narration can't hold a placeholder. Kapi records it once for every company, so say "your company" or "your IT team" instead. |
| [`pause_question_kind`](https://docs.kapiworks.com/build/reference/checks/pause-question-kind) | Error | Every type | A film can stop only for a choice or multi question. |
| [`pause_question_elsewhere`](https://docs.kapiworks.com/build/reference/checks/pause-question-elsewhere) | Error | Every type | This question also …. A question a film stops for belongs to that film only. |
| [`drawing_target_unknown`](https://docs.kapiworks.com/build/reference/checks/drawing-target-unknown) | Error | Every type | This drawing's target … names no choice of the question the scene stops for. |
| [`drawing_target_missing`](https://docs.kapiworks.com/build/reference/checks/drawing-target-missing) | Error | Every type | The choice … of the question this scene stops for has no target in the drawing, so nobody could tap it. |
| [`lesson_without_question`](https://docs.kapiworks.com/build/reference/checks/lesson-without-question) | Warning | Training course | … has no practice question. A question in each lesson helps people keep what they read. |
| [`scenario_opening_missing`](https://docs.kapiworks.com/build/reference/checks/scenario-opening-missing) | Error | Scenario practice | … doesn't open with a situation to choose from. In scenario practice, each lesson starts with a situation and a choice. |
| [`refresher_question_first`](https://docs.kapiworks.com/build/reference/checks/refresher-question-first) | Error | Quick refresher | This page doesn't start with its question. In a quick refresher, every page asks first and the feedback teaches. |
| [`refresher_too_long`](https://docs.kapiworks.com/build/reference/checks/refresher-too-long) | Warning | Quick refresher | This refresher takes about … minutes. A quick refresher takes 8 to 12. |
| [`certificate_pool_small`](https://docs.kapiworks.com/build/reference/checks/certificate-pool-small) | Error | Certificate course | A certificate test needs a pool at least twice the size of its draw (…), so each retake asks different questions. |
| [`certificate_pass_mark_missing`](https://docs.kapiworks.com/build/reference/checks/certificate-pass-mark-missing) | Warning | Certificate course | The test suggests no pass mark. The company can change it, but a certificate course should suggest one. |
| [`walkthrough_steps_missing`](https://docs.kapiworks.com/build/reference/checks/walkthrough-steps-missing) | Error | Step-by-step walkthrough | … has no numbered steps. A walkthrough shows each step in order. |
| [`walkthrough_picture_missing`](https://docs.kapiworks.com/build/reference/checks/walkthrough-picture-missing) | Tip | Step-by-step walkthrough | These steps have no picture. A screenshot of each step helps people follow along. |
| [`change_before_missing`](https://docs.kapiworks.com/build/reference/checks/change-before-missing) | Error | What changed | … doesn't show the old rule. Show it once, starting "Before" and the date it changed. |
| [`change_question_missing`](https://docs.kapiworks.com/build/reference/checks/change-question-missing) | Error | What changed | … has no situation question about the change. |
| [`video_opening_missing`](https://docs.kapiworks.com/build/reference/checks/video-opening-missing) | Error | Video | … doesn't open with a film. In a video, each lesson starts with its film. |
