Module pragma

Module pragma 

Source
Expand description

Pragma parsing for inline rule ignores.

Hadolint supports inline pragmas to ignore rules:

  • # hadolint ignore=DL3008,DL3009 - Ignore for next instruction
  • # hadolint global ignore=DL3008 - Ignore for entire file
  • # hadolint shell=/bin/bash - Set shell for ShellCheck

Structs§

PragmaState
Parsed pragma state for a Dockerfile.

Enums§

Pragma
Parsed pragma types.

Functions§

extract_pragmas
Extract pragma state from Dockerfile instructions.
parse_pragma
Parse pragma from a comment string. Returns the pragma type and any associated data.