Sha256: 3a17f7b72b954ced94ce94e50fbdca34077426ac6c91e91292437d8919ac069a

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 KB

Contents

# Prevent Missing `platformos-check-enable` Comments (`MissingEnableComment`)

This check ensures that when `platformos-check-disable` is used in your platformOS application, a corresponding `platformos-check-enable` comment is included to re-enable the checks.

## Examples

The following examples show code snippets that either fail or pass this check:

### ✗ Incorrect Code Example (Avoid using this):

```liquid
<!doctype html>
<html>
  <head>
    {% # platformos-check-disable ParserBlockingJavaScript %}
    <script src="https://cdnjs.com/jquery.min.js"></script>
  </head>
  <body>
    <!-- ... -->
  </body>
</html>
```

### &#x2713; Correct Code Example (Use this instead):

```liquid
<!doctype html>
<html>
  <head>
    {% # platformos-check-disable ParserBlockingJavaScript %}
    <script src="https://cdnjs.com/jquery.min.js"></script>
    {% # platformos-check-enable ParserBlockingJavaScript %}
  </head>
  <body>
    <!-- ... -->
  </body>
</html>
```

## Version

This check has been introduced in platformOS Check 0.3.0.

## Resources

- [Rule Source][codesource]
- [Documentation Source][docsource]

[codesource]: /lib/platformos_check/checks/missing_enable_comment.rb
[docsource]: /docs/checks/missing_enable_comment.md

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
platformos-check-0.4.14 docs/checks/missing_enable_comment.md
platformos-check-0.4.13 docs/checks/missing_enable_comment.md