B
    -
x\=                 @   s`   d Z ddlmZmZ ddlZddlZddlZddlmZ ddl	m
Z
 G dd de
Zdd	 ZdS )
zJSON reporter    )absolute_importprint_functionN)	IReporter)BaseReporterc               @   sJ   e Zd ZdZeZdZdZej	fddZ
dd Zdd Zd	d
 Zdd ZdS )JSONReporterz$Report messages and layouts in JSON.jsonc             C   s   t | | g | _d S )N)r   __init__messages)selfoutput r   4lib/python3.7/site-packages/pylint/reporters/json.pyr      s    zJSONReporter.__init__c             C   sD   | j |j|j|j|j|j|j|jt	j
|jp.ddd|jd	 dS )z<Manage message of different type and in the context of path. F)Zquote)	typemoduleobjlinecolumnpathsymbolmessagez
message-idN)r	   appendcategoryr   r   r   r   r   r   htmlescapemsgZmsg_id)r
   r   r   r   r   handle_message   s    zJSONReporter.handle_messagec             C   s   t tj| jdd| jd dS )zLaunch layouts display   )indent)fileN)printr   dumpsr	   out)r
   layoutr   r   r   display_messages/   s    zJSONReporter.display_messagesc             C   s   dS )z"Don't do nothing in this reporter.Nr   )r
   r#   r   r   r   display_reports3   s    zJSONReporter.display_reportsc             C   s   dS )zDo nothing.Nr   )r
   r#   r   r   r   _display6   s    zJSONReporter._displayN)__name__
__module____qualname____doc__r   Z__implements__name	extensionsysstdoutr   r   r$   r%   r&   r   r   r   r   r      s   r   c             C   s   |  t dS )z.Register the reporter classes with the linter.N)Zregister_reporterr   )Zlinterr   r   r   register:   s    r/   )r*   Z
__future__r   r   r   r   r-   Zpylint.interfacesr   Zpylint.reportersr   r   r/   r   r   r   r   <module>	   s   &