From 8f39ecf2ce7aa55f1dccb1a44813011be0db441f Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sun, 27 Nov 2016 13:45:10 +0100 Subject: [PATCH] [tools] Rename c_syntax and cpp_syntax. --- README.md | 4 ++-- .../{c_syntax-hello_c => c_syntax_gcc-hello_c} | 0 ...syntax-hello_cpp => cpp_syntax_gcc-hello_cpp} | 0 tools.py | 16 ++++++++-------- tools_test.py | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) rename golden-files/results/{c_syntax-hello_c => c_syntax_gcc-hello_c} (100%) rename golden-files/results/{cpp_syntax-hello_cpp => cpp_syntax_gcc-hello_cpp} (100%) diff --git a/README.md b/README.md index 4c9d38e..c849b7e 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/golden-files/results/c_syntax-hello_c b/golden-files/results/c_syntax_gcc-hello_c similarity index 100% rename from golden-files/results/c_syntax-hello_c rename to golden-files/results/c_syntax_gcc-hello_c diff --git a/golden-files/results/cpp_syntax-hello_cpp b/golden-files/results/cpp_syntax_gcc-hello_cpp similarity index 100% rename from golden-files/results/cpp_syntax-hello_cpp rename to golden-files/results/cpp_syntax_gcc-hello_cpp diff --git a/tools.py b/tools.py index 1b0e848..f98182c 100644 --- a/tools.py +++ b/tools.py @@ -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]), diff --git a/tools_test.py b/tools_test.py index 03d08e5..2abf096 100755 --- a/tools_test.py +++ b/tools_test.py @@ -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)])