#NEWLINE# @ click . command ( ) #NEWLINE# @ click . option ( '--dockerfile' , default = 'Dockerfile' , help = 'Path to the Dockerfile' ) #NEWLINE# def lint( dockerfile ) : #NEWLINE# #INDENT# 'Check for common issues with Dockerfile LABELS' #NEWLINE# try : #NEWLINE# #INDENT# linter = DockerfileLabelLint ( path = logger ) #NEWLINE# linter . namespaced_labels ( ) #NEWLINE# linter . reserved_namespaces ( ) #NEWLINE# linter . valid_characters ( ) #NEWLINE# linter . valid_start_and_end_characters ( ) #NEWLINE# linter . consecutive_dividers ( ) #NEWLINE# logger = Logger . instance ( ) #NEWLINE# if logger . has_failures : #NEWLINE# #INDENT# sys . exit ( 2 ) #NEWLINE# #UNINDENT# #UNINDENT# except DockerfileNotFoundError : #NEWLINE# #INDENT# sys . exit ( 3 )