From cbdbac021943157ed01456487fb0091d77f970fc Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Mon, 17 Jul 2017 10:50:18 +0100 Subject: [PATCH] [tools] Removed clang tools. - They were doubling the size of the AppImage. - The gcc tools do very similar syntax checking. --- README.md | 5 ++--- tests/tools_test.py | 7 ------- vigil/tools.py | 17 ++--------------- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 5a6e54b..c0cedc8 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,12 @@ then to run: Extensions | Tools ---------- | ----- .py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://www.mypy-lang.org/) • [python_coverage](http://nedbatchelder.com/code/coverage/) • [pycodestyle](https://pypi.python.org/pypi/pycodestyle) • [pyflakes](https://launchpad.net/pyflakes) • [pylint](http://www.pylint.org/) • [python_gut](https://github.com/ahamilton/vigil/blob/master/gut.py) • [python_modulefinder](https://docs.python.org/3/library/modulefinder.html) • [python_mccabe](https://github.com/flintwork/mccabe) • [bandit](https://wiki.openstack.org/wiki/Security/Projects/Bandit) -.pyc | [pydisasm](https://pypi.python.org/pypi/xdis) .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](https://github.com/uncrustify/uncrustify) -.c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [c_syntax_clang](http://clang.llvm.org/) • [splint](http://www.splint.org/) • [uncrustify](https://github.com/uncrustify/uncrustify) +.c .h | [c_syntax_gcc](https://gcc.gnu.org/) • [splint](http://www.splint.org/) • [uncrustify](https://github.com/uncrustify/uncrustify) .o | [objdump_headers](https://en.wikipedia.org/wiki/Objdump) • [objdump_disassemble](https://en.wikipedia.org/wiki/Objdump) • [readelf](https://en.wikipedia.org/wiki/Objdump) -.cc .cpp .hpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • [cpp_syntax_clang](http://clang.llvm.org/) • bcpp • [uncrustify](https://github.com/uncrustify/uncrustify) +.cc .cpp .hpp | [cpp_syntax_gcc](https://gcc.gnu.org/) • bcpp • [uncrustify](https://github.com/uncrustify/uncrustify) .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/tests/tools_test.py b/tests/tools_test.py index 303d676..fe956b7 100755 --- a/tests/tools_test.py +++ b/tests/tools_test.py @@ -167,9 +167,6 @@ class ToolsTestCase(unittest.TestCase): def test_c_syntax_gcc(self): self._test_tool(tools.c_syntax_gcc, [("hello.c", tools.Status.ok)]) - def test_c_syntax_clang(self): - self._test_tool(tools.c_syntax_clang, [("hello.c", tools.Status.ok)]) - def test_splint(self): self._test_tool(tools.splint, [("hello.c", tools.Status.ok), ("hello.h", tools.Status.ok)]) @@ -214,10 +211,6 @@ class ToolsTestCase(unittest.TestCase): def test_cpp_syntax_gcc(self): self._test_tool(tools.cpp_syntax_gcc, [("hello.cpp", tools.Status.ok)]) - def test_cpp_syntax_clang(self): - self._test_tool(tools.cpp_syntax_clang, - [("hello.cpp", tools.Status.ok)]) - def test_bcpp(self): self._test_tool(tools.bcpp, [("hello.cpp", tools.Status.normal)]) diff --git a/vigil/tools.py b/vigil/tools.py index 69f6bb3..0d7c544 100644 --- a/vigil/tools.py +++ b/vigil/tools.py @@ -532,12 +532,6 @@ def c_syntax_gcc(path): return _run_command(["gcc", "-fsyntax-only", path]) -@deps(deps={"clang"}, url="http://clang.llvm.org/", executables={"clang"}, - missing_in={"gentoo"}) -def c_syntax_clang(path): - return _run_command(["clang", "-fsyntax-only", path]) - - @deps(deps={"splint"}, url="splint", executables={"splint"}) def splint(path): stdout, stderr, returncode = _do_command(["splint", "-preproc", path]) @@ -621,12 +615,6 @@ def cpp_syntax_gcc(path): return _run_command(["gcc", "-fsyntax-only", path]) -@deps(deps={"clang"}, url="http://clang.llvm.org/", executables={"clang"}, - missing_in={"gentoo"}) -def cpp_syntax_clang(path): - return _run_command(["clang", "-fsyntax-only", path]) - - @deps(deps={"bcpp"}, fedora_deps=set(), arch_deps=set(), executables={"bcpp"}, missing_in={"arch", "fedora", "opensuse"}) def bcpp(path): @@ -858,10 +846,9 @@ TOOLS_FOR_EXTENSIONS = \ # (["p6", "pm6"], [perl6_syntax, perldoc]), (["pod", "pod6"], [perldoc]), (["java"], [uncrustify]), - (["c", "h"], [c_syntax_gcc, c_syntax_clang, splint, uncrustify]), + (["c", "h"], [c_syntax_gcc, splint, uncrustify]), (["o"], [objdump_headers, objdump_disassemble, readelf]), - (["cc", "cpp", "hpp"], [cpp_syntax_gcc, cpp_syntax_clang, bcpp, - uncrustify]), + (["cc", "cpp", "hpp"], [cpp_syntax_gcc, bcpp, uncrustify]), (["pdf"], [pdf2txt]), (["html"], [html_syntax, tidy, html2text]), (["php"], [php5_syntax]),