Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: third_party/closure_linter/closure_linter/common/erroraccumulator.py

Issue 2592193002: Remove closure_linter from Chrome (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2008 The Closure Linter Authors. All Rights Reserved.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 # http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS-IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 """Linter error handler class that accumulates an array of errors."""
18
19 __author__ = ('robbyw@google.com (Robert Walker)',
20 'ajp@google.com (Andy Perelson)')
21
22
23 from closure_linter.common import errorhandler
24
25
26 class ErrorAccumulator(errorhandler.ErrorHandler):
27 """Error handler object that accumulates errors in a list."""
28
29 def __init__(self):
30 self._errors = []
31
32 def HandleError(self, error):
33 """Append the error to the list.
34
35 Args:
36 error: The error object
37 """
38 self._errors.append(error)
39
40 def GetErrors(self):
41 """Returns the accumulated errors.
42
43 Returns:
44 A sequence of errors.
45 """
46 return self._errors
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698