Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Overview

Static Analysis is in private beta. Python, JavaScript, TypeScript, and Docker are the only supported languages. To request access, contact Support.

Static Analysis is not available for the site.

Datadog Static Analysis provides out-of-the-box rules to help detect violations in your CI/CD pipelines in code reviews and identify bugs, security, and maintainability issues. For more information, see the Static Analysis documentation.

Docker rules

Follow best practices with using Docker

Ruleset ID: docker-best-practices

Best practices for using Docker.


JavaScript rules

Follow best practices for writing JavaScript code

Ruleset ID: javascript-best-practices

Rules to enforce JavaScript best practices.

check for loop is moving in the right directionFOR-DIRECTION more more invoking a constructor must use parenthesesNEW-PARENS more more avoid the use of alert, confirm, and promptNO-ALERT more more promise executor cannot be an async functionNO-ASYNC-PROMISE-EXECUTOR more more avoid the use of arguments.caller or arguments.calleeNO-CALLER more more avoid lexical declarations in case clausesNO-CASE-DECLARATIONS more more direct comparison with -0 detectedNO-COMPARE-NEG-ZERO more more avoid assignment operators in conditional expressionsNO-COND-ASSIGN more more avoid leaving console debug statementsNO-CONSOLE more more disallow the use of debuggerNO-DEBUGGER more more avoid using delete on variables directlyNO-DELETE-VAR more more function parameters redeclaredNO-DUPE-ARGS more more avoid duplicate class membersNO-DUPE-CLASS-MEMBERS more more avoid duplicate keys in object literalsNO-DUPE-KEYS more more avoid duplicate case labelsNO-DUPLICATE-CASE more more avoid empty block statementsNO-EMPTY more more avoid empty character classes in regular expressionsNO-EMPTY-CHARACTER-CLASS more more avoid empty destructuring patternsNO-EMPTY-PATTERN more more avoid reassigning exceptions in catch clausesNO-EX-ASSIGN more more prevent the use methods similar to eval()NO-IMPLIED-EVAL more more prevent assigning to imported bindingsNO-IMPORT-ASSIGN more more avoid variable or function declaration in nested blocksNO-INNER-DECLARATIONS more more avoid the use of the __iterator__ propertyNO-ITERATOR more more avoid numbers that lose precisionNO-LOSS-OF-PRECISION more more avoid new statements with the symbol objectNO-NEW-SYMBOL more more avoid using octal literals to prevent unexpected behaviorNO-OCTAL more more avoid the use of the __proto__ propertyNO-PROTO more more avoid using javascript in urlsNO-SCRIPT-URL more more avoid negating the left operand of relational operatorsNO-UNSAFE-NEGATION more more the with statement can lead to ambiguous codeNO-WITH more more require yield in generator functionsREQUIRE-YIELD more more avoid direct comparison with nanUSE-ISNAN more more compare typeof expressions against valid stringsVALID-TYPEOF more more

Security rules for JavaScript web applications

Ruleset ID: javascript-browser-security

Rules focused on finding security issues in your JavaScript web applications.


Enforce JavaScript code style

Ruleset ID: javascript-code-style

Rules to enforce JavaScript code style.


Common security rules for JavaScript

Ruleset ID: javascript-common-security

Rules focused on finding security issues in your JavaScript code.


Check for Express.js best practices and security

Ruleset ID: javascript-express

Rules specifically for Express.js best practices and security.


Check JavaScript code for wording issues

Ruleset ID: javascript-inclusive

Rules for JavaScript to avoid inappropriate wording in the code and comments.


Identify potential security hotspots in Node

Ruleset ID: javascript-node-security

Rules to identify potential security hotspots in Node. This may include false positives that require further triage.


React specific linting rules

Ruleset ID: jsx-react

This plugin exports a recommended configuration that enforces React good practices.