[tools] Rename c_syntax and cpp_syntax.

This commit is contained in:
Andrew Hamilton 2016-11-27 13:45:10 +01:00
parent 6c425d34b5
commit 8f39ecf2ce
5 changed files with 14 additions and 14 deletions

View file

@ -32,9 +32,9 @@ Extensions | Tools
.pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/) • [perltidy](http://perltidy.sourceforge.net/)
.pod .pod6 | [perldoc](http://perldoc.perl.org/)
.java | [uncrustify](http://uncrustify.sourceforge.net/)
.c .h | [c_syntax](https://gcc.gnu.org/) • [splint](http://www.splint.org/) • [uncrustify](http://uncrustify.sourceforge.net/)
.c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [splint](http://www.splint.org/) • [uncrustify](http://uncrustify.sourceforge.net/)
.o | [objdump_headers](https://en.wikipedia.org/wiki/Objdump) • [objdump_disassemble](https://en.wikipedia.org/wiki/Objdump) • [readelf](https://en.wikipedia.org/wiki/Objdump)
.cpp | [cpp_syntax](https://gcc.gnu.org/) • bcpp • [uncrustify](http://uncrustify.sourceforge.net/)
.cpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • bcpp • [uncrustify](http://uncrustify.sourceforge.net/)
.pdf | [pdf2txt](http://www.unixuser.org/~euske/python/pdfminer/)
.html | [html_syntax](http://www.html-tidy.org/) • [tidy](http://www.html-tidy.org/) • [html2text](http://www.mbayer.de/html2text/)
.php | [php5_syntax](https://en.wikipedia.org/wiki/PHP)

View file

@ -509,10 +509,10 @@ perltidy.url = "http://perltidy.sourceforge.net/"
# perl6_syntax.dependencies = {"rakudo"}
def c_syntax(path):
def c_syntax_gcc(path):
return _run_command(["gcc", "-fsyntax-only", path])
c_syntax.dependencies = {"gcc"}
c_syntax.url = "https://gcc.gnu.org/"
c_syntax_gcc.dependencies = {"gcc"}
c_syntax_gcc.url = "https://gcc.gnu.org/"
def splint(path):
@ -601,10 +601,10 @@ html2text.dependencies = {"html2text"}
html2text.url = "html2text"
def cpp_syntax(path):
def cpp_syntax_gcc(path):
return _run_command(["gcc", "-fsyntax-only", path])
cpp_syntax.dependencies = {"gcc"}
cpp_syntax.url = "https://gcc.gnu.org/"
cpp_syntax_gcc.dependencies = {"gcc"}
cpp_syntax_gcc.url = "https://gcc.gnu.org/"
def bcpp(path):
@ -766,9 +766,9 @@ TOOLS_FOR_EXTENSIONS = \
# (["p6", "pm6"], [perl6_syntax, perldoc]),
(["pod", "pod6"], [perldoc]),
(["java"], [uncrustify]),
(["c", "h"], [c_syntax, splint, uncrustify]),
(["c", "h"], [c_syntax_gcc, splint, uncrustify]),
(["o"], [objdump_headers, objdump_disassemble, readelf]),
(["cpp"], [cpp_syntax, bcpp, uncrustify]),
(["cpp"], [cpp_syntax_gcc, bcpp, uncrustify]),
(["pdf"], [pdf2txt]),
(["html"], [html_syntax, tidy, html2text]),
(["php"], [php5_syntax]),

View file

@ -153,8 +153,8 @@ class ToolsTestCase(unittest.TestCase):
("hello.h", tools.Status.normal),
("hello.cpp", tools.Status.normal)])
def test_c_syntax(self):
self._test_tool(tools.c_syntax, [("hello.c", tools.Status.ok)])
def test_c_syntax_gcc(self):
self._test_tool(tools.c_syntax_gcc, [("hello.c", tools.Status.ok)])
def test_splint(self):
self._test_tool(tools.splint, [("hello.c", tools.Status.ok),
@ -197,8 +197,8 @@ class ToolsTestCase(unittest.TestCase):
def test_html2text(self):
self._test_tool(tools.html2text, [("hi.html", tools.Status.normal)])
def test_cpp_syntax(self):
self._test_tool(tools.cpp_syntax, [("hello.cpp", tools.Status.ok)])
def test_cpp_syntax_gcc(self):
self._test_tool(tools.cpp_syntax_gcc, [("hello.cpp", tools.Status.ok)])
def test_bcpp(self):
self._test_tool(tools.bcpp, [("hello.cpp", tools.Status.normal)])