3
^^                 @   sP   d 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    N)	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 j| | g | _d S )N)r   __init__messages)selfoutput r
   @/tmp/pip-build-8app2_gc/pylint/pylint/reporters/json_reporter.pyr      s    zJSONReporter.__init__c             C   sD   | j 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)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_reports1   s    zJSONReporter.display_reportsc             C   s   dS )zDo nothing.Nr
   )r   r"   r
   r
   r   _display4   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   | j t dS )z.Register the reporter classes with the linter.N)Zregister_reporterr   )Zlinterr
   r
   r   register8   s    r.   )
r)   r   r   r,   Zpylint.interfacesr   Zpylint.reporters.base_reporterr   r   r.   r
   r
   r
   r   <module>	   s   &