parameters: (self)
return_statement: return self._error_count
docstring: Run linter, returning error count.
docstring_summary: Run linter, returning error count.
docstring_tokens: Run linter returning error count .
function: def lint(self):
          """Run linter, returning error count."""
          # 3 steps:
          #  1. Check for header
          #  2. Check for NOLINT and Strip multi line comments
          #  3. Run per-line checks
  
          start_line = self._check_for_server_side_public_license()
  
          self._check_newlines()
          self._check_and_strip_comments()
  
          for linenum in range(start_line, len(self.clean_lines)):
              if not self.clean_lines[linenum]:
                  continue
  
              self._check_for_mongo_volatile(linenum)
              self._check_for_mongo_polyfill(linenum)
              self._check_for_mongo_atomic(linenum)
              self._check_for_mongo_mutex(linenum)
              self._check_for_nonmongo_assert(linenum)
              self._check_for_mongo_unstructured_log(linenum)
              self._check_for_mongo_config_header(linenum)
              self._check_for_ctype(linenum)
              self._check_for_std_optional(linenum)
              self._check_for_tracing_support(linenum)
  
              # Relax the rule of commenting generic FCV references for files directly related to FCV
              # implementations.
              if not "feature_compatibility_version" in self.file_name:
                  self._check_for_generic_fcv(linenum)
  
          return self._error_count
function_tokens: def lint ( self ) : # 3 steps: #  1. Check for header #  2. Check for NOLINT and Strip multi line comments #  3. Run per-line checks start_line = self . _check_for_server_side_public_license ( ) self . _check_newlines ( ) self . _check_and_strip_comments ( ) for linenum in range ( start_line , len ( self . clean_lines ) ) : if not self . clean_lines [ linenum ] : continue self . _check_for_mongo_volatile ( linenum ) self . _check_for_mongo_polyfill ( linenum ) self . _check_for_mongo_atomic ( linenum ) self . _check_for_mongo_mutex ( linenum ) self . _check_for_nonmongo_assert ( linenum ) self . _check_for_mongo_unstructured_log ( linenum ) self . _check_for_mongo_config_header ( linenum ) self . _check_for_ctype ( linenum ) self . _check_for_std_optional ( linenum ) self . _check_for_tracing_support ( linenum ) # Relax the rule of commenting generic FCV references for files directly related to FCV # implementations. if not "feature_compatibility_version" in self . file_name : self . _check_for_generic_fcv ( linenum ) return self . _error_count