mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Remove dead code in clint.py
This commit is contained in:
parent
c1c335f71c
commit
302998b0c7
24
clint.py
24
clint.py
@ -28,10 +28,10 @@
|
|||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
"""Does google-lint on c++ files.
|
"""Does neovim-lint on c files.
|
||||||
|
|
||||||
The goal of this script is to identify places in the code that *may*
|
The goal of this script is to identify places in the code that *may*
|
||||||
be in non-compliance with google style. It does not attempt to fix
|
be in non-compliance with neovim style. It does not attempt to fix
|
||||||
up these problems -- the point is to educate. It does also not
|
up these problems -- the point is to educate. It does also not
|
||||||
attempt to find all problems, or to ensure that everything it does
|
attempt to find all problems, or to ensure that everything it does
|
||||||
find is legitimately a problem.
|
find is legitimately a problem.
|
||||||
@ -65,7 +65,7 @@ Syntax: clint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...]
|
|||||||
<file> [file] ...
|
<file> [file] ...
|
||||||
|
|
||||||
The style guidelines this tries to follow are those in
|
The style guidelines this tries to follow are those in
|
||||||
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
|
http://neovim.org/development-wiki/style-guide/style-guide.xml
|
||||||
|
|
||||||
Note: This is Google's cpplint.py modified for use with the Neovim project,
|
Note: This is Google's cpplint.py modified for use with the Neovim project,
|
||||||
which follows the Google C++ coding convention except with the following
|
which follows the Google C++ coding convention except with the following
|
||||||
@ -351,8 +351,7 @@ class _IncludeState(dict):
|
|||||||
filename and line number on which that file was included.
|
filename and line number on which that file was included.
|
||||||
|
|
||||||
Call CheckNextIncludeOrder() once for each header in the file, passing
|
Call CheckNextIncludeOrder() once for each header in the file, passing
|
||||||
in the type constants defined above. Calls in an illegal order will
|
in the type constants defined above.
|
||||||
raise an _IncludeError with an appropriate error message.
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# self._section will move monotonically through this set. If it ever
|
# self._section will move monotonically through this set. If it ever
|
||||||
@ -613,11 +612,6 @@ class _FunctionState(object):
|
|||||||
self.in_a_function = False
|
self.in_a_function = False
|
||||||
|
|
||||||
|
|
||||||
class _IncludeError(Exception):
|
|
||||||
"""Indicates a problem with the include order in a file."""
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class FileInfo:
|
class FileInfo:
|
||||||
"""Provides utility functions for filenames.
|
"""Provides utility functions for filenames.
|
||||||
|
|
||||||
@ -674,14 +668,6 @@ class FileInfo:
|
|||||||
"""File extension - text following the final period."""
|
"""File extension - text following the final period."""
|
||||||
return self.Split()[2]
|
return self.Split()[2]
|
||||||
|
|
||||||
def NoExtension(self):
|
|
||||||
"""File has no source file extension."""
|
|
||||||
return '/'.join(self.Split()[0:2])
|
|
||||||
|
|
||||||
def IsSource(self):
|
|
||||||
"""File has a source file extension."""
|
|
||||||
return self.Extension()[1:] == 'c'
|
|
||||||
|
|
||||||
|
|
||||||
def _ShouldPrintError(category, confidence, linenum):
|
def _ShouldPrintError(category, confidence, linenum):
|
||||||
"""If confidence >= verbose, category passes filter and is not suppressed."""
|
"""If confidence >= verbose, category passes filter and is not suppressed."""
|
||||||
@ -2900,7 +2886,7 @@ def ProcessFileData(filename, file_extension, lines, error,
|
|||||||
CheckForNewlineAtEOF(filename, lines, error)
|
CheckForNewlineAtEOF(filename, lines, error)
|
||||||
|
|
||||||
def ProcessFile(filename, vlevel, extra_check_functions=[]):
|
def ProcessFile(filename, vlevel, extra_check_functions=[]):
|
||||||
"""Does google-lint on a single file.
|
"""Does neovim-lint on a single file.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
filename: The name of the file to parse.
|
filename: The name of the file to parse.
|
||||||
|
Loading…
Reference in New Issue
Block a user