       return @setPanelVisibility(false)
     @setPanelVisibility(true)
     @_messages.forEach (message)=>
-      if @scope is 'file' then return unless message.currentFile
+      if @_scope is 'file' then return unless message.currentFile
       if message.currentFile and message.range #Add the decorations to the current TextEditor
         marker = @linter.activeEditor.markBufferRange message.range, {invalidate: 'never'}
         @_decorations.push @linter.activeEditor.decorateMarker(

    @_panelWorkspace = atom.workspace.addBottomPanel item: @_panel, visible: false

    # Set default tab to File
    @scope = 'file' # the value of @scope is changed from views/bottom-tab-{file, project}
    @_bottomTabFile.active = true
    @_panel.id = 'linter-panel'



  # consumed in views/bottom-tab-{file, project}
  changeTab: (Tab)->
    @_scope = Tab
    @_bottomTabProject.active = Tab is 'project'
    @_bottomTabFile.active = Tab is 'file'
    @_renderPanel()
