import re

from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY


class SCSSLintBear(LocalBear, Lint):
    executable = 'scss-lint'
    arguments = '{filename}'
    output_regex = re.compile(
                r'(?P<file_name>.+):(?P<line>\d+)\s*'
                r'(\[(?P<severity>.*?)\])\s*'
                r'(?P<message>.*)')
    severity_map = {
        "I": RESULT_SEVERITY.INFO,
        "W": RESULT_SEVERITY.NORMAL,
        "E": RESULT_SEVERITY.MAJOR
    }

    def run(self, filename, file):
        '''
        Checks the code with `scss-lint` on each file separately.
        '''
        return self.lint(filename)

@@ -1,15 +1,4 @@
-import re%0A%0A
 from
@@ -30,24 +30,26 @@
 ons.Lint
+er
  import 
 Lint%0Afro
@@ -44,56 +44,13 @@
 ort 
-Lint%0Afrom coalib.bears.LocalBear import LocalBea
+linte
 r%0Afr
@@ -112,49 +112,16 @@
 Y%0A%0A%0A
-class SCSSLintBear(LocalBear, Lint):%0A    
+@linter(
 exec
@@ -126,19 +126,17 @@
 ecutable
- = 
+=
 'scss-li
@@ -142,104 +142,58 @@
 int'
-%0A    arguments = '%7Bfilename%7D'%0A    output_regex = re.compile(%0A                r'(?P%3Cfile_name%3E
+, output_format=%22regex%22,%0A        output_regex=r'
 .+
-)
 :(?P
@@ -204,37 +204,17 @@
 e%3E%5Cd+)%5Cs
-*'%0A                r'
++
 (%5C%5B(?P%3Cs
@@ -226,10 +226,8 @@
 ty%3E.
-*?
 )%5C%5D)
@@ -247,16 +247,21 @@
         
+     
 r'(?P%3Cme
@@ -274,14 +274,18 @@
 .*)'
-)%0A
+,%0A   
     
+ 
 seve
@@ -296,24 +296,13 @@
 _map
- = %7B%0A        %22I%22
+=%7B'I'
 : RE
@@ -333,11 +333,25 @@
     
-%22W%22
+              'W'
 : RE
@@ -384,11 +384,25 @@
     
-%22E%22
+              'E'
 : RE
@@ -424,71 +424,43 @@
 AJOR
-%0A    %7D%0A%0A    def run(self, filename, file):%0A        '''%0A 
+%7D)%0Aclass SCSSLintBear:%0A    %22%22%22%0A
     
-   
 Chec
@@ -476,16 +476,17 @@
 de with 
+%60
 %60scss-li
@@ -488,16 +488,17 @@
 ss-lint%60
+%60
  on each
@@ -523,47 +523,107 @@
     
-    '''%0A        return self.lint(
+%22%22%22%0A%0A    @staticmethod%0A    def create_arguments(filename, file, config_file):%0A        return 
 filename
 )%0A
@@ -620,10 +620,10 @@
 filename
-)
+,
 %0A

Refactor to Linter v2 API