{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":38884,"path":"platform-administration/instance-scan/hc-linter-check.md","title":"Create a linter check","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create a linter check\n\nCreate a linter check to identify any issues in a script. When a linter check is run on a record, an abstract syntax tree for its code is generated. You can use the abstract syntax tree to analyze issues with the code.\n\n## Before you begin\n\nRole required: scan\\_admin.\n\n```\nBefore performing this task you must complete [Create a check](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/instance-scan/hs-create-health-check.md).\n```\n\n## Procedure\n\n1.  Select **Create a new Linter Check**.\n\n2.  On the form, fill in the fields.\n\n<table id=\"table_rrj_m3k_gnb\"><thead><tr><th>\n\nFields\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nName\n\n</td><td>\n\nName of the check record.\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nApplication that has the check record.\n\n</td></tr><tr><td>\n\nCategory\n\n</td><td>\n\nCategory of the check record.\n\n</td></tr><tr><td>\n\nPriority\n\n</td><td>\n\nPriority at which the findings should be resolved.\n\n</td></tr><tr><td>\n\nVersion\n\n</td><td>\n\nCurrent version of the check record.**Note:** If you want to update an already existing check, the **Version** field increments itself.\n\n</td></tr><tr><td>\n\nActive\n\n</td><td>\n\nOption to activate this check record.\n\n</td></tr><tr><td>\n\nShort Description\n\n</td><td>\n\nMandatory description about the check records.\n\n</td></tr><tr><td>\n\nDescription\n\n</td><td>\n\nAdditional information about the check records.\n\n</td></tr><tr><td>\n\nResolution Details\n\n</td><td>\n\nGuideline to avoid check to go off against one or more tables.\n\n</td></tr><tr><td>\n\nDocumentation URL\n\n</td><td>\n\nDocumentation link for the check details.**Note:** A scan\\_user can't edit the **Documentation URL** field.\n\n</td></tr><tr><td>\n\nRun Condition\n\n</td><td>\n\nBoolean field that determines if the check should be run.\n\n</td></tr><tr><td>\n\nScript\n\n</td><td>\n\nThe script that executes against each record that matches the condition. By default, this field has an engine object to use. This engine object contains other objects like `engine.finding` which you can call `engine.finding.increment()` to manually increment the **Count** field on that specific finding. Another object is `engine.current` which is the current GlideRecord that the check would be viewing when running.**Note:** This is new to Quebec release, where previously you would call `finding` and `current` directly.\n\n</td></tr></tbody>\n</table>\n-   **[Advanced linter check scripts](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/instance-scan/hs-linter-check-scripts.md)**  \nLinter check scripts helps you in writing checks that look for issues in scripts. When a linter check is run on a record, it provides an abstract syntax tree for its code. You can use this abstract syntax tree to analyze issues with the code such as too many nested if statements or usages of slow API in a while loop.\n\n**Parent Topic:**[Create a check](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-administration/instance-scan/hs-create-health-check.md)\n\n"}}