#!/usr/bin/env python3
from whalelinter.app          import App
from whalelinter.dispatcher   import Dispatcher
from whalelinter.token        import Maintainer
from whalelinter.commands.apt import Apt

import whalelinter.commands.common


class Checker(object):
    def __init__(self, dictionnary):
        self.lines              = dictionnary
        self.line_number        = 0
        self.consecutive_run    = 0
        self.apt_has_been_used  = False

    def check(self):
        dispatcher = Dispatcher()

        for self.line_number, line in self.lines.items():
            dispatcher.react(line, self.line_number)
            self.must_be_present(line[0])
            self.must_be_unique(line[0])
            self.should_be_present(line[0])

        if self.apt_has_been_used is True:
            App._collecter.throw(3000)

        for mandatory_token in App._mandatory_tokens:
            App._collecter.throw(1000)

        for recommended_token in App._recommended_tokens:
            App._collecter.throw(3001, keys={'token': recommended_token})

    def must_be_present(self, current_token):
        if current_token in App._mandatory_tokens:
            App._mandatory_tokens.remove(current_token)

    def should_be_present(self, current_token):
        if current_token in App._recommended_tokens:
            App._recommended_tokens.remove(current_token)

    def must_be_unique(self, current_token):
        if current_token in App._unique_tokens:
            App._unique_tokens[current_token] += 1
            if App._unique_tokens[current_token] > 1:
                App._collecter.throw(1001, self.line_number, keys={'token': current_token})

@@ -1082,32 +1082,24 @@
 esent(self, 
-current_
 token):%0A    
@@ -1101,32 +1101,24 @@
 %0A        if 
-current_
 token in App
@@ -1174,32 +1174,24 @@
 kens.remove(
-current_
 token)%0A%0A    
@@ -1214,32 +1214,24 @@
 esent(self, 
-current_
 token):%0A    
@@ -1233,32 +1233,24 @@
 %0A        if 
-current_
 token in App
@@ -1314,24 +1314,16 @@
 .remove(
-current_
 token)%0A%0A
@@ -1351,24 +1351,16 @@
 e(self, 
-current_
 token):%0A
@@ -1370,24 +1370,16 @@
      if 
-current_
 token in
@@ -1426,32 +1426,24 @@
 ique_tokens%5B
-current_
 token%5D += 1%0A
@@ -1476,24 +1476,16 @@
 _tokens%5B
-current_
 token%5D %3E
@@ -1568,16 +1568,8 @@
 n': 
-current_
 toke

Rename 'current_token' parameter to 'token'