enkidulan / slidelint Goto Github PK
View Code? Open in Web Editor NEWReads in PDF of presentation slides and checks common problems, outputs a summary report on the problems.
License: Apache License 2.0
Reads in PDF of presentation slides and checks common problems, outputs a summary report on the problems.
License: Apache License 2.0
The language tool checker doesn't seem to work on my system.
Looks like the java process seems to die in someway. Probably a simple problem with paths or such?
12691 pts/4 R+ 0:05 | \_ /usr/bin/python ./bin/nosetests -v
12700 pts/4 Z+ 0:00 | \_ [java] <defunct>
File "/usr/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/tansell/foss/slidelint/src/slidelint/tests/TestCheckerLanguageTool.py", line 14, in test_language_tool_checker
rez = language_tool_checker.main(target_file=target_file)
File "/home/tansell/foss/slidelint/src/slidelint/checkers/language_tool_checker.py", line 601, in main
with LanguagetoolServer(lt_path, keep_alive) as grammar_checker:
File "/home/tansell/foss/slidelint/src/slidelint/checkers/language_tool_checker.py", line 571, in __init__
self.port, self.pid = get_languagetool_port_and_pid(self.lt_path, self.config_file)
File "/home/tansell/foss/slidelint/src/slidelint/checkers/language_tool_checker.py", line 559, in get_languagetool_port_and_pid
return start_languagetool_server(lt_path, config_file)
File "/home/tansell/foss/slidelint/src/slidelint/checkers/language_tool_checker.py", line 548, in start_languagetool_server
while 'Server started' not in process.stdout.readline():
KeyboardInterrupt
commit fdfd231481bdedbc8da8b243f9b0b1051b4c0b92
Author: enkidulan <[email protected]>
Date: Tue Oct 29 02:36:06 2013 +0200
cleanup
As the moment I think there is a some confusion about the test for slidelint and would like to make it a little clearer.
We should have the tests split into two groups;
(a) should be about making sure that an individual checker is correctly detecting what it should. They should not be affected by changes in default configuration, new checkers being added, etc. Each slide PDF in this case is a custom designed slide to specifically cover the checkers problems.
I think most of the tests under slidelint/tests are of this variety at the moment?
(b) should be a directory of PDF files and then slidelint output for those slides. These should mostly be real presentations (both good and bad).
Example possible layout,
test/simplepdf.pdf
test/simplepdf.default.txt
test/simplepdf.config1.txt
test/simplepdf.config2.txt
A script then you just compare the output of "slidelint --config configfile test/simplepdf.pdf" to the txt file.
As new checkers are added, defaults are changed, etc, the output here will probably change. In many ways it just a change log of how slidelint output changes over time with identical input (rather than "real tests").
There should be a quick "rebaseline" script which just updates the .txt files.
$ bin/nosetests slidelint
Fatal error: local() encountered an error (return code 1) while executing 'bin/slidelint --config=/home/tansell/foss/slidelint/src/slidelint/tests/acceptance/config1 /home/tansell/foss/slidelint/src/slidelint/tests/acceptance/good_presentation.pdf'
Aborting.
E
Fatal error: local() encountered an error (return code 1) while executing 'bin/slidelint -i -f colorized -d C1002,ContentQuality,edges_danger_zone -e language_tool_checker /home/tansell/foss/slidelint/src/slidelint/tests/acceptance/bad_presentation.pdf'
Aborting.
E
Fatal error: local() encountered an error (return code 1) while executing 'bin/slidelint -f html --files-output /home/tansell/foss/slidelint/src/slidelint/tests/acceptance/bad_presentation.pdf'
Aborting.
E
Fatal error: local() encountered an error (return code 1) while executing 'bin/slidelint -i /home/tansell/foss/slidelint/src/slidelint/tests/acceptance/bad_presentation.pdf'
Aborting.
E
Fatal error: local() encountered an error (return code 1) while executing 'bin/slidelint -f parseable /home/tansell/foss/slidelint/src/slidelint/tests/acceptance/bad_presentation.pdf'
Aborting.
E
It would be great if there was a "DEVELOPING.rst" or similar document which;
Mostly just line to long issues...
(for i in $(find -name \*.py); do pep8 $i; done)
./tests/TestCheckerTextReadability.py:13:80: E501 line too long (80 > 79 characters)
./tests/TestCheckerTextReadability.py:16:11: E128 continuation line under-indented for visual indent
./tests/TestCheckerTextReadability.py:16:80: E501 line too long (149 > 79 characters)
./tests/TestCheckerTextReadability.py:21:80: E501 line too long (149 > 79 characters)
./tests/TestCheckerTextReadability.py:26:80: E501 line too long (149 > 79 characters)
./tests/TestCheckerTextReadability.py:31:80: E501 line too long (149 > 79 characters)
./tests/TestCheckerTextReadability.py:39:80: E501 line too long (83 > 79 characters)
./tests/TestCheckerTextReadability.py:41:80: E501 line too long (82 > 79 characters)
./tests/TestConfigParser.py:30:80: E501 line too long (93 > 79 characters)
./tests/TestConfigParser.py:46:80: E501 line too long (83 > 79 characters)
./tests/TestConfigParser.py:51:80: E501 line too long (81 > 79 characters)
./tests/TestOutputs.py:90:17: E128 continuation line under-indented for visual indent
./tests/TestUseCase.py:16:14: E121 continuation line indentation is not a multiple of four
./tests/TestUseCase.py:23:80: E501 line too long (83 > 79 characters)
./tests/TestUseCase.py:30:80: E501 line too long (99 > 79 characters)
./tests/TestUseCase.py:34:80: E501 line too long (90 > 79 characters)
./tests/TestUseCase.py:36:18: E128 continuation line under-indented for visual indent
./tests/TestUseCase.py:37:80: E501 line too long (103 > 79 characters)
./tests/TestUseCase.py:39:80: E501 line too long (93 > 79 characters)
./tests/TestUseCase.py:40:80: E501 line too long (94 > 79 characters)
./tests/TestUseCase.py:53:80: E501 line too long (132 > 79 characters)
./tests/TestUseCase.py:54:80: E501 line too long (132 > 79 characters)
./tests/TestUseCase.py:55:80: E501 line too long (132 > 79 characters)
./tests/TestUseCase.py:56:80: E501 line too long (105 > 79 characters)
./tests/TestUseCase.py:57:80: E501 line too long (133 > 79 characters)
./tests/TestUseCase.py:58:80: E501 line too long (165 > 79 characters)
./tests/TestUseCase.py:59:80: E501 line too long (106 > 79 characters)
./tests/TestUseCase.py:60:80: E501 line too long (87 > 79 characters)
./tests/TestUseCase.py:63:80: E501 line too long (92 > 79 characters)
./tests/TestUseCase.py:64:13: E124 closing bracket does not match visual indentation
./tests/TestUseCase.py:68:80: E501 line too long (100 > 79 characters)
./tests/TestUseCase.py:70:18: E128 continuation line under-indented for visual indent
./tests/TestUseCase.py:71:80: E501 line too long (103 > 79 characters)
./tests/TestUseCase.py:72:80: E501 line too long (128 > 79 characters)
./tests/TestUseCase.py:73:80: E501 line too long (145 > 79 characters)
./tests/TestUseCase.py:74:80: E501 line too long (146 > 79 characters)
./tests/TestUseCase.py:75:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:76:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:77:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:78:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:79:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:80:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:81:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:82:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:83:80: E501 line too long (120 > 79 characters)
./tests/TestUseCase.py:84:80: E501 line too long (121 > 79 characters)
./tests/TestUseCase.py:85:80: E501 line too long (121 > 79 characters)
./tests/TestUseCase.py:86:80: E501 line too long (121 > 79 characters)
./tests/TestUseCase.py:87:80: E501 line too long (184 > 79 characters)
./tests/TestUseCase.py:88:80: E501 line too long (184 > 79 characters)
./tests/TestUseCase.py:89:80: E501 line too long (184 > 79 characters)
./tests/TestUseCase.py:90:80: E501 line too long (157 > 79 characters)
./tests/TestUseCase.py:91:80: E501 line too long (185 > 79 characters)
./tests/TestUseCase.py:92:80: E501 line too long (217 > 79 characters)
./tests/TestUseCase.py:93:80: E501 line too long (158 > 79 characters)
./tests/TestUseCase.py:94:80: E501 line too long (156 > 79 characters)
./tests/TestUseCase.py:97:80: E501 line too long (144 > 79 characters)
./tests/TestUseCase.py:98:14: E124 closing bracket does not match visual indentation
./tests/TestUseCase.py:102:80: E501 line too long (171 > 79 characters)
./tests/TestUseCase.py:104:18: E128 continuation line under-indented for visual indent
./tests/TestUseCase.py:105:80: E501 line too long (138 > 79 characters)
./tests/TestUseCase.py:106:80: E501 line too long (103 > 79 characters)
./tests/TestUseCase.py:107:80: E501 line too long (93 > 79 characters)
./tests/TestUseCase.py:108:80: E501 line too long (94 > 79 characters)
./tests/TestUseCase.py:109:80: E501 line too long (132 > 79 characters)
./tests/TestUseCase.py:110:80: E501 line too long (132 > 79 characters)
./tests/TestUseCase.py:111:80: E501 line too long (132 > 79 characters)
./tests/TestUseCase.py:112:80: E501 line too long (105 > 79 characters)
./tests/TestUseCase.py:113:80: E501 line too long (133 > 79 characters)
./tests/TestUseCase.py:114:80: E501 line too long (165 > 79 characters)
./tests/TestUseCase.py:115:80: E501 line too long (104 > 79 characters)
./tests/TestUseCase.py:116:14: E124 closing bracket does not match visual indentation
./tests/TestUseCase.py:120:80: E501 line too long (109 > 79 characters)
./tests/TestUseCase.py:122:17: E128 continuation line under-indented for visual indent
./tests/TestUseCase.py:123:14: E124 closing bracket does not match visual indentation
./tests/TestUseCase.py:126:17: E128 continuation line under-indented for visual indent
./tests/TestUseCase.py:129:80: E501 line too long (87 > 79 characters)
./tests/TestUseCase.py:135:80: E501 line too long (111 > 79 characters)
./tests/TestUseCase.py:136:80: E501 line too long (111 > 79 characters)
./tests/TestUseCase.py:139:14: E124 closing bracket does not match visual indentation
./tests/TestUseCase.py:143:80: E501 line too long (136 > 79 characters)
./tests/TestUseCase.py:145:17: E128 continuation line under-indented for visual indent
./tests/TestUseCase.py:145:80: E501 line too long (102 > 79 characters)
./tests/TestUseCase.py:155:80: E501 line too long (89 > 79 characters)
./tests/TestUseCase.py:161:80: E501 line too long (85 > 79 characters)
./tests/TestUseCase.py:164:80: E501 line too long (91 > 79 characters)
./tests/TestUseCase.py:165:14: E124 closing bracket does not match visual indentation
./tests/files/test_modules.py:4:80: E501 line too long (110 > 79 characters)
./tests/files/test_modules.py:5:80: E501 line too long (111 > 79 characters)
./tests/files/test_modules.py:8:80: E501 line too long (110 > 79 characters)
./tests/files/test_modules.py:9:80: E501 line too long (111 > 79 characters)
./tests/files/test_modules.py:12:80: E501 line too long (110 > 79 characters)
./tests/files/test_modules.py:13:80: E501 line too long (111 > 79 characters)
./tests/files/test_modules.py:19:80: E501 line too long (93 > 79 characters)
./tests/files/test_modules.py:25:80: E501 line too long (95 > 79 characters)
./tests/files/test_modules.py:32:80: E501 line too long (93 > 79 characters)
./tests/files/test_modules.py:41:80: E501 line too long (93 > 79 characters)
./tests/files/test_modules.py:45:80: E501 line too long (103 > 79 characters)
./tests/TestCheckerFontSize.py:16:80: E501 line too long (95 > 79 characters)
./tests/TestCheckerFontSize.py:17:80: E501 line too long (96 > 79 characters)
./tests/TestCheckerFontSize.py:22:80: E501 line too long (95 > 79 characters)
./tests/TestCheckerFontSize.py:23:80: E501 line too long (96 > 79 characters)
./tests/TestCheckerFontSize.py:29:7: E111 indentation is not a multiple of four
./tests/TestCheckerFontSize.py:30:80: E501 line too long (83 > 79 characters)
./tests/TestCheckerFontSize.py:33:80: E501 line too long (133 > 79 characters)
./tests/TestCheckerFontSize.py:34:80: E501 line too long (96 > 79 characters)
./tests/TestCheckerFontSize.py:38:7: E111 indentation is not a multiple of four
./tests/TestCheckerFontSize.py:39:80: E501 line too long (97 > 79 characters)
./tests/TestLintModules.py:9:1: E302 expected 2 blank lines, found 1
./tests/TestLintModules.py:13:80: E501 line too long (92 > 79 characters)
./tests/TestLintModules.py:23:13: E128 continuation line under-indented for visual indent
./tests/TestLintModules.py:23:80: E501 line too long (92 > 79 characters)
./tests/TestLintModules.py:25:80: E501 line too long (93 > 79 characters)
./tests/TestLintModules.py:27:80: E501 line too long (92 > 79 characters)
./tests/TestLintModules.py:29:80: E501 line too long (93 > 79 characters)
./tests/TestLintModules.py:31:80: E501 line too long (92 > 79 characters)
./tests/TestLintModules.py:33:80: E501 line too long (93 > 79 characters)
./tests/TestLintModules.py:40:13: E128 continuation line under-indented for visual indent
./tests/TestLintModules.py:41:80: E501 line too long (90 > 79 characters)
./tests/TestLintModules.py:43:80: E501 line too long (90 > 79 characters)
./tests/TestLintModules.py:45:80: E501 line too long (91 > 79 characters)
./tests/TestLintModules.py:52:80: E501 line too long (86 > 79 characters)
./tests/TestLintModules.py:53:80: E501 line too long (80 > 79 characters)
./tests/TestLintModules.py:54:80: E501 line too long (81 > 79 characters)
./tests/TestLintModules.py:55:80: E501 line too long (80 > 79 characters)
./tests/TestLintModules.py:56:80: E501 line too long (81 > 79 characters)
./tests/TestLintModules.py:57:80: E501 line too long (80 > 79 characters)
./tests/TestLintModules.py:58:80: E501 line too long (82 > 79 characters)
./tests/TestLintModules.py:63:13: E128 continuation line under-indented for visual indent
./tests/TestLintModules.py:66:80: E501 line too long (93 > 79 characters)
./tests/TestLintModules.py:70:1: E303 too many blank lines (3)
./tests/TestPluggins.py:44:80: E501 line too long (88 > 79 characters)
./tests/TestPluggins.py:55:80: E501 line too long (96 > 79 characters)
./tests/TestPluggins.py:60:80: E501 line too long (92 > 79 characters)
./tests/TestPluggins.py:63:80: E501 line too long (84 > 79 characters)
./tests/TestNameSpace.py:27:80: E501 line too long (88 > 79 characters)
./tests/TestNameSpace.py:28:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerLanguageTool.py:16:80: E501 line too long (85 > 79 characters)
./tests/TestCheckerLanguageTool.py:18:80: E501 line too long (143 > 79 characters)
./tests/TestCheckerLanguageTool.py:21:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerLanguageTool.py:26:80: E501 line too long (90 > 79 characters)
./tests/TestCheckerLanguageTool.py:31:80: E501 line too long (99 > 79 characters)
./tests/TestCheckerEdges.py:16:80: E501 line too long (91 > 79 characters)
./tests/TestCheckerEdges.py:17:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerEdges.py:22:80: E501 line too long (91 > 79 characters)
./tests/TestCheckerEdges.py:23:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerEdges.py:29:7: E111 indentation is not a multiple of four
./tests/TestCheckerEdges.py:30:80: E501 line too long (90 > 79 characters)
./tests/TestCheckerEdges.py:34:80: E501 line too long (91 > 79 characters)
./tests/TestCheckerEdges.py:35:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerEdges.py:38:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:38:80: E501 line too long (91 > 79 characters)
./tests/TestCheckerEdges.py:39:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:39:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerEdges.py:40:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:42:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:42:80: E501 line too long (91 > 79 characters)
./tests/TestCheckerEdges.py:43:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:43:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerEdges.py:44:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:46:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:46:80: E501 line too long (91 > 79 characters)
./tests/TestCheckerEdges.py:47:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:47:80: E501 line too long (92 > 79 characters)
./tests/TestCheckerEdges.py:48:23: E127 continuation line over-indented for visual indent
./tests/TestCheckerEdges.py:51:7: E111 indentation is not a multiple of four
./tests/TestCheckerEdges.py:52:80: E501 line too long (97 > 79 characters)
./tests/TestCheckerRegexpRunner.py:15:11: E121 continuation line indentation is not a multiple of four
./tests/TestCheckerRegexpRunner.py:21:80: E501 line too long (182 > 79 characters)
./tests/TestCheckerRegexpRunner.py:24:80: E501 line too long (192 > 79 characters)
./tests/TestCheckerRegexpRunner.py:26:80: E501 line too long (81 > 79 characters)
./tests/TestCheckerRegexpRunner.py:29:80: E501 line too long (191 > 79 characters)
./tests/TestCheckerRegexpRunner.py:30:19: E127 continuation line over-indented for visual indent
./tests/TestCheckerRegexpRunner.py:31:80: E501 line too long (89 > 79 characters)
./tests/TestCheckerRegexpRunner.py:33:37: E231 missing whitespace after ','
./tests/TestCheckerRegexpRunner.py:37:11: E121 continuation line indentation is not a multiple of four
./tests/TestCheckerRegexpRunner.py:43:80: E501 line too long (182 > 79 characters)
./tests/TestCheckerRegexpRunner.py:46:80: E501 line too long (190 > 79 characters)
./tests/TestCheckerRegexpRunner.py:48:80: E501 line too long (189 > 79 characters)
./tests/TestCheckerRegexpRunner.py:50:30: E231 missing whitespace after ','
./tests/TestCheckerRegexpRunner.py:54:80: E501 line too long (192 > 79 characters)
./tests/TestCheckerRegexpRunner.py:56:80: E501 line too long (191 > 79 characters)
./tests/TestCheckerRegexpRunner.py:58:30: E231 missing whitespace after ','
./tests/TestCheckerContents.py:13:7: E111 indentation is not a multiple of four
./tests/TestCheckerContents.py:14:80: E501 line too long (91 > 79 characters)
./tests/TestCheckerContents.py:17:80: E501 line too long (116 > 79 characters)
./tests/TestCheckerContents.py:18:80: E501 line too long (90 > 79 characters)
./tests/TestCheckerContents.py:22:80: E501 line too long (101 > 79 characters)
./namespace.py:38:80: E501 line too long (82 > 79 characters)
./namespace.py:39:80: E501 line too long (81 > 79 characters)
./namespace.py:40:51: E228 missing whitespace around modulo operator
./outputs.py:11:1: E302 expected 2 blank lines, found 1
./outputs.py:34:80: E501 line too long (82 > 79 characters)
./outputs.py:36:80: E501 line too long (86 > 79 characters)
./outputs.py:39:80: E501 line too long (94 > 79 characters)
./outputs.py:41:80: E501 line too long (92 > 79 characters)
./outputs.py:66:80: E501 line too long (100 > 79 characters)
./outputs.py:87:55: E225 missing whitespace around operator
./outputs.py:87:80: E501 line too long (81 > 79 characters)
./outputs.py:98:80: E501 line too long (96 > 79 characters)
./outputs.py:114:80: E501 line too long (85 > 79 characters)
./outputs.py:120:80: E501 line too long (92 > 79 characters)
./outputs.py:122:80: E501 line too long (82 > 79 characters)
./checkers/regex_grammar_checker.py:29:21: E126 continuation line over-indented for hanging indent
./checkers/regex_grammar_checker.py:30:21: E126 continuation line over-indented for hanging indent
./checkers/regex_grammar_checker.py:41:80: E501 line too long (99 > 79 characters)
./checkers/fontsize.py:9:80: E501 line too long (85 > 79 characters)
./checkers/language_tool_checker.py:13:6: E121 continuation line indentation is not a multiple of four
./checkers/language_tool_checker.py:521:2: E123 closing bracket does not match indentation of opening bracket's line
./checkers/language_tool_checker.py:571:80: E501 line too long (91 > 79 characters)
./checkers/language_tool_checker.py:579:80: E501 line too long (82 > 79 characters)
./checkers/language_tool_checker.py:581:80: E501 line too long (91 > 79 characters)
./checkers/language_tool_checker.py:605:80: E501 line too long (96 > 79 characters)
./checkers/language_tool_checker.py:608:80: E501 line too long (96 > 79 characters)
./checkers/language_tool_checker.py:614:49: E127 continuation line over-indented for visual indent
./checkers/edges_danger_zone.py:9:80: E501 line too long (81 > 79 characters)
./checkers/readability.py:58:80: E501 line too long (83 > 79 characters)
./checkers/readability.py:72:80: E501 line too long (92 > 79 characters)
./checkers/readability.py:73:20: E128 continuation line under-indented for visual indent
./checkers/readability.py:73:68: E202 whitespace before ')'
./checkers/readability.py:102:80: E501 line too long (80 > 79 characters)
./checkers/readability.py:113:29: E701 multiple statements on one line (colon)
./checkers/readability.py:115:25: W602 deprecated form of raising exception
./checkers/readability.py:127:80: E501 line too long (85 > 79 characters)
./checkers/readability.py:138:80: E501 line too long (80 > 79 characters)
./checkers/readability.py:139:80: E501 line too long (86 > 79 characters)
./checkers/readability.py:141:80: E501 line too long (108 > 79 characters)
./checkers/readability.py:146:80: E501 line too long (87 > 79 characters)
./checkers/readability.py:161:80: E501 line too long (166 > 79 characters)
./utils.py:43:80: E501 line too long (90 > 79 characters)
./resources.py:30:80: E501 line too long (84 > 79 characters)
./resources.py:33:80: E501 line too long (86 > 79 characters)
./resources.py:34:80: E501 line too long (90 > 79 characters)
./resources.py:36:80: E501 line too long (118 > 79 characters)
./resources.py:38:80: E501 line too long (103 > 79 characters)
./resources.py:39:80: E501 line too long (96 > 79 characters)
./config_parser.py:13:80: E501 line too long (84 > 79 characters)
./config_parser.py:14:80: E501 line too long (87 > 79 characters)
./config_parser.py:24:80: E501 line too long (86 > 79 characters)
./config_parser.py:26:80: E501 line too long (83 > 79 characters)
./config_parser.py:49:80: E501 line too long (85 > 79 characters)
./config_parser.py:91:80: E501 line too long (89 > 79 characters)
./config_parser.py:101:80: E501 line too long (98 > 79 characters)
./config_parser.py:103:80: E501 line too long (92 > 79 characters)
./config_parser.py:105:80: E501 line too long (92 > 79 characters)
./config_parser.py:125:13: E128 continuation line under-indented for visual indent
./config_parser.py:125:80: E501 line too long (81 > 79 characters)
./cli.py:15:80: E501 line too long (81 > 79 characters)
./cli.py:18:80: E501 line too long (133 > 79 characters)
./cli.py:19:80: E501 line too long (108 > 79 characters)
./cli.py:20:80: E501 line too long (134 > 79 characters)
./cli.py:21:80: E501 line too long (109 > 79 characters)
./cli.py:37:80: E501 line too long (83 > 79 characters)
./cli.py:45:80: E501 line too long (81 > 79 characters)
./cli.py:66:80: E501 line too long (84 > 79 characters)
./cli.py:73:80: E501 line too long (100 > 79 characters)
Could you please include the original source files for the PDF documents so they can be easily edited.
Could you also please include a README.rst in src/slidelint/tests/files/pdfs/ describing each of the PDF files, how they were made (IE original source tool) and what they are attempting to test.
Please create a pylint configuration file which configures pylint to match the style you are using. Disable pylint messages where it gets false positives.
Current pylint output using
for i in $(find -name \*.py); do pylint -r n $i; done
************* Module tests.TestCheckerTextReadability
C: 16,0: Line too long (149/80)
C: 21,0: Line too long (149/80)
C: 26,0: Line too long (149/80)
C: 31,0: Line too long (149/80)
C: 39,0: Line too long (83/80)
C: 41,0: Line too long (82/80)
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint.checkers'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:TestContentsChecker: Missing docstring
C: 12,4:TestContentsChecker.test_readability: Missing docstring
R: 12,4:TestContentsChecker.test_readability: Method could be a function
C: 37,4:TestContentsChecker.test_checker_helpers: Missing docstring
R: 37,4:TestContentsChecker.test_checker_helpers: Method could be a function
R: 10,0:TestContentsChecker: Too many public methods (47/20)
************* Module tests.TestConfigParser
C: 30,0: Line too long (93/80)
C: 46,0: Line too long (83/80)
C: 51,0: Line too long (81/80)
W: 73,0: TODO: tests for LintConfig.compose
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:TestSequenceFunctions: Missing docstring
C: 12,4:TestSequenceFunctions.test_enables_disables: Missing docstring
R: 12,4:TestSequenceFunctions.test_enables_disables: Method could be a function
C: 21,4:TestSequenceFunctions.test_default_config: Missing docstring
C: 22,29:TestSequenceFunctions.test_default_config: Invalid name "l" (should match [a-z_][a-z0-9_]{2,30}$)
R: 21,4:TestSequenceFunctions.test_default_config: Method could be a function
C: 28,4:TestSequenceFunctions.test_dummy_config: Missing docstring
R: 28,4:TestSequenceFunctions.test_dummy_config: Method could be a function
C: 45,4:TestSequenceFunctions.test_detailed_config: Missing docstring
R: 45,4:TestSequenceFunctions.test_detailed_config: Method could be a function
C: 55,4:TestSequenceFunctions.test_mixed_config: Missing docstring
R: 55,4:TestSequenceFunctions.test_mixed_config: Method could be a function
R: 10,0:TestSequenceFunctions: Too many public methods (50/20)
************* Module tests
C: 1,0: Missing docstring
************* Module tests.TestOutputs
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 4,0: Unable to import 'slidelint.outputs'
C: 7,0:TestSequenceFunctions: Missing docstring
C: 9,4:TestSequenceFunctions.setUp: Invalid name "setUp" (should match [a-z_][a-z0-9_]{2,30}$)
C: 22,4:TestSequenceFunctions.tearDown: Invalid name "tearDown" (should match [a-z_][a-z0-9_]{2,30}$)
C: 25,4:TestSequenceFunctions.test_defaults: Missing docstring
C: 33,4:TestSequenceFunctions.test_message_show_ids: Missing docstring
C: 41,4:TestSequenceFunctions.test_message_mute_ids: Missing docstring
C: 48,4:TestSequenceFunctions.test_parseable_format: Missing docstring
C: 56,4:TestSequenceFunctions.test_msvs_format: Missing docstring
C: 64,4:TestSequenceFunctions.test_colorized_format: Missing docstring
C: 72,4:TestSequenceFunctions.test_html_format: Missing docstring
C: 85,4:TestSequenceFunctions.test_file_output: Missing docstring
C: 86,32:TestSequenceFunctions.test_file_output: Invalid name "d" (should match [a-z_][a-z0-9_]{2,30}$)
R: 7,0:TestSequenceFunctions: Too many public methods (53/20)
************* Module tests.TestUseCase
C: 23,0: Line too long (83/80)
C: 30,0: Line too long (99/80)
C: 34,0: Line too long (90/80)
C: 37,0: Line too long (103/80)
C: 39,0: Line too long (93/80)
C: 40,0: Line too long (94/80)
C: 53,0: Line too long (132/80)
C: 54,0: Line too long (132/80)
C: 55,0: Line too long (132/80)
C: 56,0: Line too long (105/80)
C: 57,0: Line too long (133/80)
C: 58,0: Line too long (165/80)
C: 59,0: Line too long (106/80)
C: 60,0: Line too long (87/80)
C: 63,0: Line too long (92/80)
C: 68,0: Line too long (100/80)
C: 71,0: Line too long (103/80)
C: 72,0: Line too long (128/80)
C: 73,0: Line too long (145/80)
C: 74,0: Line too long (146/80)
C: 75,0: Line too long (120/80)
C: 76,0: Line too long (120/80)
C: 77,0: Line too long (120/80)
C: 78,0: Line too long (120/80)
C: 79,0: Line too long (120/80)
C: 80,0: Line too long (120/80)
C: 81,0: Line too long (120/80)
C: 82,0: Line too long (120/80)
C: 83,0: Line too long (120/80)
C: 84,0: Line too long (121/80)
C: 85,0: Line too long (121/80)
C: 86,0: Line too long (121/80)
C: 87,0: Line too long (184/80)
C: 88,0: Line too long (184/80)
C: 89,0: Line too long (184/80)
C: 90,0: Line too long (157/80)
C: 91,0: Line too long (185/80)
C: 92,0: Line too long (217/80)
C: 93,0: Line too long (158/80)
C: 94,0: Line too long (156/80)
C: 97,0: Line too long (144/80)
C:102,0: Line too long (171/80)
C:105,0: Line too long (138/80)
C:106,0: Line too long (103/80)
C:107,0: Line too long (93/80)
C:108,0: Line too long (94/80)
C:109,0: Line too long (132/80)
C:110,0: Line too long (132/80)
C:111,0: Line too long (132/80)
C:112,0: Line too long (105/80)
C:113,0: Line too long (133/80)
C:114,0: Line too long (165/80)
C:115,0: Line too long (104/80)
C:120,0: Line too long (109/80)
C:129,0: Line too long (87/80)
C:135,0: Line too long (111/80)
C:136,0: Line too long (111/80)
C:143,0: Line too long (136/80)
C:145,0: Line too long (102/80)
C:155,0: Line too long (89/80)
C:161,0: Line too long (85/80)
C:164,0: Line too long (91/80)
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 4,0: Unable to import 'tempdir'
F: 5,0: Unable to import 'fabric'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:run: Missing docstring
C: 20,0:TestAcceptance: Missing docstring
C: 22,4:TestAcceptance.setUp: Invalid name "setUp" (should match [a-z_][a-z0-9_]{2,30}$)
C: 26,4:TestAcceptance.test_pip_instalation: Missing docstring
C: 27,34:TestAcceptance.test_pip_instalation: Invalid name "t" (should match [a-z_][a-z0-9_]{2,30}$)
R: 26,4:TestAcceptance.test_pip_instalation: Method could be a function
C: 32,4:TestAcceptance.test_info_option: Missing docstring
C: 66,4:TestAcceptance.test_output_format: Missing docstring
C:100,4:TestAcceptance.test_enablind_disabling: Missing docstring
C:118,4:TestAcceptance.test_file_output_file: Missing docstring
C:141,4:TestAcceptance.test_custom_config_file: Missing docstring
R: 20,0:TestAcceptance: Too many public methods (51/20)
************* Module tests.files
C: 1,0: Missing docstring
************* Module tests.files.test_modules
C: 4,0: Line too long (110/80)
C: 5,0: Line too long (111/80)
C: 8,0: Line too long (110/80)
C: 9,0: Line too long (111/80)
C: 12,0: Line too long (110/80)
C: 13,0: Line too long (111/80)
C: 19,0: Line too long (93/80)
C: 25,0: Line too long (95/80)
C: 32,0: Line too long (93/80)
C: 41,0: Line too long (93/80)
C: 45,0: Line too long (103/80)
C: 1,0: Missing docstring
C: 3,0: Invalid name "messages_g1_c1" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 7,0: Invalid name "messages_g1_c2" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 11,0: Invalid name "messages_g2_c1" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 16,0:group1_cheker1: Missing docstring
C: 20,12:group1_cheker1: Invalid name "m" (should match [a-z_][a-z0-9_]{2,30}$)
W: 16,19:group1_cheker1: Unused argument 'target_file'
C: 29,0:group1_cheker2: Missing docstring
C: 33,12:group1_cheker2: Invalid name "m" (should match [a-z_][a-z0-9_]{2,30}$)
C: 38,0:group2_cheker1: Missing docstring
C: 42,12:group2_cheker1: Invalid name "m" (should match [a-z_][a-z0-9_]{2,30}$)
W: 38,19:group2_cheker1: Unused argument 'target_file'
W: 1,0: Unused import namedtuple
************* Module tests.TestCheckerFontSize
C: 16,0: Line too long (95/80)
C: 17,0: Line too long (96/80)
C: 22,0: Line too long (95/80)
C: 23,0: Line too long (96/80)
W: 29,0: Bad indentation. Found 6 spaces, expected 8
C: 30,0: Line too long (83/80)
W: 30,0: Bad indentation. Found 8 spaces, expected 12
W: 31,0: Bad indentation. Found 8 spaces, expected 12
W: 32,0: Bad indentation. Found 8 spaces, expected 12
C: 33,0: Line too long (133/80)
C: 34,0: Line too long (96/80)
W: 38,0: Bad indentation. Found 6 spaces, expected 8
C: 39,0: Line too long (97/80)
W: 39,0: Bad indentation. Found 8 spaces, expected 12
W: 40,0: Bad indentation. Found 8 spaces, expected 12
W: 41,0: Bad indentation. Found 8 spaces, expected 12
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint.checkers'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:TestFontSizeChecker: Missing docstring
C: 12,4:TestFontSizeChecker.test_checker_helpers: Missing docstring
R: 12,4:TestFontSizeChecker.test_checker_helpers: Method could be a function
C: 28,4:TestFontSizeChecker.test_file_with_small_text: Missing docstring
R: 28,4:TestFontSizeChecker.test_file_with_small_text: Method could be a function
C: 37,4:TestFontSizeChecker.test_file_with_large_text: Missing docstring
R: 37,4:TestFontSizeChecker.test_file_with_large_text: Method could be a function
R: 10,0:TestFontSizeChecker: Too many public methods (48/20)
************* Module tests.TestLintModules
C: 13,0: Line too long (92/80)
C: 23,0: Line too long (92/80)
C: 25,0: Line too long (93/80)
C: 27,0: Line too long (92/80)
C: 29,0: Line too long (93/80)
C: 31,0: Line too long (92/80)
C: 33,0: Line too long (93/80)
C: 41,0: Line too long (90/80)
C: 43,0: Line too long (90/80)
C: 45,0: Line too long (91/80)
C: 52,0: Line too long (86/80)
C: 54,0: Line too long (81/80)
C: 56,0: Line too long (81/80)
C: 58,0: Line too long (82/80)
C: 66,0: Line too long (93/80)
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint.cli'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 9,0:TestLinterRunner: Missing docstring
C: 10,4:TestLinterRunner.setUp: Invalid name "setUp" (should match [a-z_][a-z0-9_]{2,30}$)
C: 19,4:TestLinterRunner.test_get_messages_info_all: Missing docstring
C: 36,4:TestLinterRunner.test_get_messages_info_list_ids: Missing docstring
C: 47,4:TestLinterRunner.test_get_messages_info_text_output: Invalid name "test_get_messages_info_text_output" (should match [a-z_][a-z0-9_]{2,30}$)
C: 47,4:TestLinterRunner.test_get_messages_info_text_output: Missing docstring
W: 51,12:TestLinterRunner.test_get_messages_info_text_output: Unused variable 'results'
C: 60,4:TestLinterRunner.test_file_check: Missing docstring
R: 9,0:TestLinterRunner: Too many public methods (49/20)
************* Module tests.TestPluggins
C: 44,0: Line too long (88/80)
C: 55,0: Line too long (96/80)
C: 60,0: Line too long (92/80)
C: 63,0: Line too long (84/80)
C: 1,0: Missing docstring
F: 2,0: Unable to import 'testfixtures'
F: 3,0: Unable to import 'slidelint.resources'
F: 4,0: Unable to import 'slidelint.resources'
C: 7,0:Loadable: Missing docstring
C: 11,4:Loadable.load: Missing docstring
R: 7,0:Loadable: Too few public methods (1/2)
C: 27,0:TestSequenceFunctions: Missing docstring
C: 29,4:TestSequenceFunctions.setUp: Invalid name "setUp" (should match [a-z_][a-z0-9_]{2,30}$)
C: 33,4:TestSequenceFunctions.test_all_categiries: Missing docstring
C: 38,4:TestSequenceFunctions.test_enable_category: Missing docstring
C: 43,4:TestSequenceFunctions.test_disable_category: Missing docstring
C: 48,4:TestSequenceFunctions.test_enable_checker: Missing docstring
C: 54,4:TestSequenceFunctions.test_disable_checker: Missing docstring
C: 59,4:TestSequenceFunctions.test_mixed: Missing docstring
R: 27,0:TestSequenceFunctions: Too many public methods (51/20)
************* Module tests.TestNameSpace
C: 27,0: Line too long (88/80)
C: 28,0: Line too long (92/80)
C: 1,0: Missing docstring
F: 2,0: Unable to import 'testfixtures'
F: 3,0: Unable to import 'slidelint'
C: 6,0:TestSequenceFunctions: Missing docstring
C: 8,4:TestSequenceFunctions.test_message_re: Missing docstring
C: 13,4:TestSequenceFunctions.test_checker_re: Missing docstring
C: 21,4:TestSequenceFunctions.test_categoty_re: Missing docstring
C: 26,4:TestSequenceFunctions.test_clasify: Missing docstring
R: 26,4:TestSequenceFunctions.test_clasify: Method could be a function
R: 6,0:TestSequenceFunctions: Too many public methods (49/20)
************* Module tests.TestCheckerLanguageTool
C: 16,0: Line too long (85/80)
C: 18,0: Line too long (143/80)
C: 21,0: Line too long (92/80)
C: 26,0: Line too long (90/80)
C: 31,0: Line too long (99/80)
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint.checkers'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:TestContentsChecker: Missing docstring
C: 12,4:TestContentsChecker.test_language_tool_checker: Missing docstring
R: 12,4:TestContentsChecker.test_language_tool_checker: Method could be a function
C: 37,4:TestContentsChecker.test_checker_helpers: Missing docstring
R: 37,4:TestContentsChecker.test_checker_helpers: Method could be a function
R: 10,0:TestContentsChecker: Too many public methods (47/20)
************* Module tests.TestCheckerEdges
C: 16,0: Line too long (91/80)
C: 17,0: Line too long (92/80)
C: 22,0: Line too long (91/80)
C: 23,0: Line too long (92/80)
W: 29,0: Bad indentation. Found 6 spaces, expected 8
C: 30,0: Line too long (90/80)
W: 30,0: Bad indentation. Found 8 spaces, expected 12
W: 31,0: Bad indentation. Found 8 spaces, expected 12
W: 32,0: Bad indentation. Found 8 spaces, expected 12
C: 34,0: Line too long (91/80)
C: 35,0: Line too long (92/80)
C: 38,0: Line too long (91/80)
C: 39,0: Line too long (92/80)
C: 42,0: Line too long (91/80)
C: 43,0: Line too long (92/80)
C: 46,0: Line too long (91/80)
C: 47,0: Line too long (92/80)
W: 51,0: Bad indentation. Found 6 spaces, expected 8
C: 52,0: Line too long (97/80)
W: 52,0: Bad indentation. Found 8 spaces, expected 12
W: 53,0: Bad indentation. Found 8 spaces, expected 12
W: 54,0: Bad indentation. Found 8 spaces, expected 12
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint.checkers'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:TestEdgesDangerZoneChecker: Missing docstring
C: 12,4:TestEdgesDangerZoneChecker.test_checker_helpers: Missing docstring
R: 12,4:TestEdgesDangerZoneChecker.test_checker_helpers: Method could be a function
C: 28,4:TestEdgesDangerZoneChecker.test_text_is_to_close_to_edges: Missing docstring
R: 28,4:TestEdgesDangerZoneChecker.test_text_is_to_close_to_edges: Method could be a function
C: 50,4:TestEdgesDangerZoneChecker.test_text_if_not_near_edges: Missing docstring
R: 50,4:TestEdgesDangerZoneChecker.test_text_if_not_near_edges: Method could be a function
R: 10,0:TestEdgesDangerZoneChecker: Too many public methods (48/20)
************* Module tests.TestCheckerRegexpRunner
C: 21,0: Line too long (182/80)
C: 24,0: Line too long (192/80)
C: 26,0: Line too long (81/80)
C: 29,0: Line too long (191/80)
C: 31,0: Line too long (89/80)
C: 43,0: Line too long (182/80)
C: 46,0: Line too long (190/80)
C: 48,0: Line too long (189/80)
C: 54,0: Line too long (192/80)
C: 56,0: Line too long (191/80)
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint.checkers'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:TestRegexGrammarChecker: Missing docstring
C: 12,4:TestRegexGrammarChecker.test_regex_grammar_checker: Missing docstring
W: 22,14:TestRegexGrammarChecker.test_regex_grammar_checker: Used * or ** magic
R: 12,4:TestRegexGrammarChecker.test_regex_grammar_checker: Method could be a function
C: 35,4:TestRegexGrammarChecker.test_checker_helpers: Missing docstring
W: 44,20:TestRegexGrammarChecker.test_checker_helpers: Used * or ** magic
W: 52,20:TestRegexGrammarChecker.test_checker_helpers: Used * or ** magic
W: 60,16:TestRegexGrammarChecker.test_checker_helpers: Used * or ** magic
R: 35,4:TestRegexGrammarChecker.test_checker_helpers: Method could be a function
R: 10,0:TestRegexGrammarChecker: Too many public methods (47/20)
************* Module tests.TestCheckerContents
W: 13,0: Bad indentation. Found 6 spaces, expected 8
C: 14,0: Line too long (91/80)
W: 14,0: Bad indentation. Found 8 spaces, expected 12
W: 15,0: Bad indentation. Found 8 spaces, expected 12
W: 16,0: Bad indentation. Found 8 spaces, expected 12
C: 17,0: Line too long (116/80)
C: 18,0: Line too long (90/80)
C: 22,0: Line too long (101/80)
C: 1,0: Missing docstring
F: 3,0: Unable to import 'testfixtures'
F: 5,0: Unable to import 'slidelint.checkers'
C: 7,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:TestContentsChecker: Missing docstring
C: 12,4:TestContentsChecker.test_file_without_text: Missing docstring
R: 12,4:TestContentsChecker.test_file_without_text: Method could be a function
C: 20,4:TestContentsChecker.test_file_with_text: Missing docstring
R: 20,4:TestContentsChecker.test_file_with_text: Method could be a function
C: 26,4:TestContentsChecker.test_checker_helpers: Missing docstring
R: 26,4:TestContentsChecker.test_checker_helpers: Method could be a function
R: 10,0:TestContentsChecker: Too many public methods (48/20)
************* Module pdf_utils
F: 3,0: Unable to import 'pdfminer.pdfparser'
F: 4,0: Unable to import 'pdfminer.pdfinterp'
F: 9,0: Unable to import 'pdfminer.converter'
F: 10,0: Unable to import 'pdfminer.layout'
W: 11,0: Uses of a deprecated module 'string'
C: 14,0:split_to_sentences_per_pages: Missing docstring
C: 15,4:split_to_sentences_per_pages.split_into_sentences: Missing docstring
W: 16,15:split_to_sentences_per_pages.split_into_sentences: Used builtin function 'filter'
W: 17,11:split_to_sentences_per_pages: Used builtin function 'filter'
W: 17,24:split_to_sentences_per_pages: Used builtin function 'map'
C: 27,4:convert_pdf_to_text: Invalid name "fp" (should match [a-z_][a-z0-9_]{2,30}$)
W: 42,19:layout_characters: Access to a protected member _text of a client class
W: 43,23:layout_characters: Access to a protected member _text of a client class
C: 57,4:document_pages_layouts: Invalid name "fp" (should match [a-z_][a-z0-9_]{2,30}$)
C: 66,8:document_pages_layouts: Invalid name "n" (should match [a-z_][a-z0-9_]{2,30}$)
************* Module namespace
C: 38,0: Line too long (82/80)
C: 39,0: Line too long (81/80)
C: 5,0: Invalid name "message" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 6,0: Invalid name "checker" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 7,0: Invalid name "category" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 10,0:valid_category_id: Missing docstring
C: 16,0:valid_checker_id: Missing docstring
C: 22,0:valid_message_id: Missing docstring
************* Module outputs
C: 34,0: Line too long (82/80)
C: 36,0: Line too long (86/80)
C: 39,0: Line too long (94/80)
C: 41,0: Line too long (92/80)
C: 66,0: Line too long (100/80)
C: 87,0: Line too long (81/80)
C: 98,0: Line too long (96/80)
C:120,0: Line too long (92/80)
C:122,0: Line too long (82/80)
W: 71,0: TODO: add fancy JS formatter like in robotframework
F: 6,0: Unable to import 'colorama'
C: 9,0: Invalid name "user_messages" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 11,0:BaseReporter: Missing docstring
C: 22,4:BaseReporter.update_title: Missing docstring
W: 22,27:BaseReporter.update_title: Unused argument 'path'
C: 25,4:BaseReporter.preformatfix: Missing docstring
C: 30,4:BaseReporter.apply_formating: Missing docstring
C: 31,8:BaseReporter.apply_formating.encoding_normalazer: Missing docstring
C: 33,23:BaseReporter.apply_formating.encoding_normalazer: Invalid name "v" (should match [a-z_][a-z0-9_]{2,30}$)
W: 36,16:BaseReporter.apply_formating: Used * or ** magic
E: 36,16:BaseReporter.apply_formating: Instance of 'BaseReporter' has no 'formatter' member
C: 44,0:TextReporter: Missing docstring
C: 48,0:ParseableTextReporter: Missing docstring
C: 53,0:VSTextReporter: Missing docstring
C: 58,0:ColorizedTextReporter: Missing docstring
W: 66,59:ColorizedTextReporter.apply_formating: Used * or ** magic
C: 70,0:HTMLTextReporter: Missing docstring
W: 87,24:HTMLTextReporter.apply_formating: Used * or ** magic
W: 98,47:output_handler: Redefining built-in 'format'
W: 98,0:output_handler: Dangerous default value [] as argument
R: 98,0:output_handler: Too many arguments (6/5)
C:126,33:output_handler: Invalid name "f" (should match [a-z_][a-z0-9_]{2,30}$)
************* Module __init__
C: 1,0: Missing docstring
C: 4,0: Invalid name "__here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
************* Module checkers.regex_grammar_checker
W: 35,0: Bad indentation. Found 16 spaces, expected 12
W: 36,0: Bad indentation. Found 16 spaces, expected 12
W: 37,0: Bad indentation. Found 20 spaces, expected 16
C: 41,0: Line too long (99/80)
F: 5,0: Unable to import 'slidelint.utils'
F: 6,0: Unable to import 'slidelint.pdf_utils'
C: 8,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
W: 22,34:main: Redefining built-in 'help'
W: 21,62:main: Redefining built-in 'id'
C: 21,0:main: Invalid name "id" (should match [a-z_][a-z0-9_]{2,30}$)
R: 21,0:main: Too many arguments (8/5)
R: 21,0:main: Too many local variables (18/15)
C: 21,62:main: Invalid name "id" (should match [a-z_][a-z0-9_]{2,30}$)
W: 26,13:main: Used * or ** magic
************* Module checkers
C: 1,0: Missing docstring
************* Module checkers.fontsize
C: 9,0: Line too long (85/80)
W: 2,0: Redefining built-in 'help'
F: 2,0: Unable to import 'slidelint.utils'
F: 3,0: Unable to import 'slidelint.pdf_utils'
C: 5,0: Invalid name "messages" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 12,0:main: Missing docstring
************* Module checkers.language_tool_checker
C:571,0: Line too long (91/80)
C:579,0: Line too long (82/80)
C:581,0: Line too long (91/80)
C:605,0: Line too long (96/80)
C:608,0: Line too long (96/80)
W: 1,0: Redefining built-in 'help'
C: 1,0: Missing docstring
F: 1,0: Unable to import 'slidelint.utils'
F: 2,0: Unable to import 'slidelint.pdf_utils'
F: 7,0: Unable to import 'appdirs'
F: 8,0: Unable to import 'requests'
C: 10,0: Invalid name "package_root" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 11,0: Invalid name "lt_path" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 12,0: Invalid name "messages" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C:523,0: Invalid name "messages_by_rules" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C:526,0:get_free_port: Missing docstring
W:530,4:get_free_port: Unused variable 'ipaddr'
W:535,30:start_languagetool_server: Redefining name 'lt_path' from outer scope (line 11)
C:535,0:start_languagetool_server: Missing docstring
C:546,35:start_languagetool_server: Invalid name "f" (should match [a-z_][a-z0-9_]{2,30}$)
W:554,34:get_languagetool_port_and_pid: Redefining name 'lt_path' from outer scope (line 11)
C:554,0:get_languagetool_port_and_pid: Missing docstring
C:562,0:LanguagetoolServer: Missing docstring
W:564,23:LanguagetoolServer.__init__: Redefining name 'lt_path' from outer scope (line 11)
C:574,4:LanguagetoolServer.grammar_checker: Missing docstring
W:590,23:LanguagetoolServer.__exit__: Redefining built-in 'type'
R:562,0:LanguagetoolServer: Too few public methods (1/2)
C:595,0:main: Missing docstring
************* Module checkers.contents
W: 2,0: TODO: this thing also can check pages allowed range and word allowed range
W: 3,0: Redefining built-in 'help'
F: 3,0: Unable to import 'slidelint.utils'
F: 4,0: Unable to import 'slidelint.pdf_utils'
C: 6,0: Invalid name "messages" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 13,0:main: Missing docstring
C: 19,12:main: Invalid name "m" (should match [a-z_][a-z0-9_]{2,30}$)
************* Module checkers.edges_danger_zone
C: 9,0: Line too long (81/80)
W: 2,0: Redefining built-in 'help'
F: 2,0: Unable to import 'slidelint.utils'
F: 3,0: Unable to import 'slidelint.pdf_utils'
C: 5,0: Invalid name "messages" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 12,0:main: Missing docstring
************* Module checkers.readability
C: 58,0: Line too long (83/80)
C: 72,0: Line too long (92/80)
C:127,0: Line too long (85/80)
C:139,0: Line too long (86/80)
C:141,0: Line too long (108/80)
C:146,0: Line too long (87/80)
C:161,0: Line too long (166/80)
W: 2,0: TODO: this code is pretty horrible and needs refactoring
W: 58,0: TODO: this should be replaced by character color extraction from PDF directly
W: 3,0: Redefining built-in 'help'
F: 3,0: Unable to import 'slidelint.utils'
F: 5,0: Unable to import 'tempdir'
F: 8,0: Unable to import 'slidelint.pdf_utils'
F: 9,0: Unable to import 'pdfminer.layout'
C: 14,0: Invalid name "messages" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 21,0:layout_characters: Missing docstring
W: 24,28:layout_characters: Access to a protected member _text of a client class
W: 25,23:layout_characters: Access to a protected member _text of a client class
W: 51,4:tranform2html: Redefining name 'html' from outer scope (line 7)
R: 55,0:TextColorExtractor: Too few public methods (0/2)
C: 80,0:get_text_color_and_background: Missing docstring
R: 80,0:get_text_color_and_background: Too many local variables (18/15)
W: 83,20:get_text_color_and_background: Access to a protected member _text of a client class
C: 91,12:get_text_color_and_background: Invalid name "x0" (should match [a-z_][a-z0-9_]{2,30}$)
C: 91,16:get_text_color_and_background: Invalid name "y0" (should match [a-z_][a-z0-9_]{2,30}$)
C: 91,20:get_text_color_and_background: Invalid name "x1" (should match [a-z_][a-z0-9_]{2,30}$)
C: 91,24:get_text_color_and_background: Invalid name "y1" (should match [a-z_][a-z0-9_]{2,30}$)
W: 91,29:get_text_color_and_background: Used builtin function 'map'
W: 94,18:get_text_color_and_background: Access to a protected member _text of a client class
W: 99,8:goes_throught_pages: Redefining name 'html' from outer scope (line 7)
C: 97,0:goes_throught_pages: Missing docstring
C:113,30:html_color_to_grayscale: More than one statement on a single line
C:116,4:html_color_to_grayscale: Invalid name "r" (should match [a-z_][a-z0-9_]{2,30}$)
C:116,7:html_color_to_grayscale: Invalid name "g" (should match [a-z_][a-z0-9_]{2,30}$)
C:116,10:html_color_to_grayscale: Invalid name "b" (should match [a-z_][a-z0-9_]{2,30}$)
C:117,4:html_color_to_grayscale: Invalid name "r" (should match [a-z_][a-z0-9_]{2,30}$)
C:117,7:html_color_to_grayscale: Invalid name "g" (should match [a-z_][a-z0-9_]{2,30}$)
C:117,10:html_color_to_grayscale: Invalid name "b" (should match [a-z_][a-z0-9_]{2,30}$)
C:127,8:VisibilityChecker.__init__: Invalid name "cc" (should match [a-z_][a-z0-9_]{2,30}$)
C:129,4:VisibilityChecker.colors_slice_sum: Missing docstring
W:141,34:VisibilityChecker.__call__: Used builtin function 'map'
R:122,0:VisibilityChecker: Too few public methods (1/2)
C:146,0:main: Missing docstring
W:155,12:main: Unused variable 'character'
W: 9,0: Unused import LAParams
W: 10,0: Unused import ImageDraw
************* Module utils
C: 43,0: Line too long (90/80)
W: 7,0:help: Redefining built-in 'help'
C: 1,0: Missing docstring
C: 4,0: Invalid name "logger" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 7,0:help: Missing docstring
C: 10,8:help: Invalid name "m" (should match [a-z_][a-z0-9_]{2,30}$)
C: 22,4:MultiprocessingManager.append: Missing docstring
C: 25,4:MultiprocessingManager.wrapper: Missing docstring
W: 29,15:MultiprocessingManager.wrapper: Catching too general exception Exception
W: 27,18:MultiprocessingManager.wrapper: Used * or ** magic
R: 25,4:MultiprocessingManager.wrapper: Method could be a function
W: 36,27:MultiprocessingManager.__iter__: Used * or ** magic
C: 45,16:MultiprocessingManager.__iter__: Invalid name "p" (should match [a-z_][a-z0-9_]{2,30}$)
************* Module resources
C: 30,0: Line too long (84/80)
C: 33,0: Line too long (86/80)
C: 34,0: Line too long (90/80)
C: 36,0: Line too long (118/80)
C: 38,0: Line too long (103/80)
C: 39,0: Line too long (96/80)
C: 1,0: Missing docstring
C: 4,0: Invalid name "EntryPoint" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 5,0: Invalid name "Checker" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
W: 23,4:PlugginsHandler.load_checkers: Dangerous default value ['AllCategories'] as argument
W: 23,4:PlugginsHandler.load_checkers: Dangerous default value [] as argument
W: 23,4:PlugginsHandler.load_checkers: Dangerous default value [] as argument
W: 23,4:PlugginsHandler.load_checkers: Dangerous default value [] as argument
R: 8,0:PlugginsHandler: Too few public methods (1/2)
************* Module config_parser
C: 13,0: Line too long (84/80)
C: 14,0: Line too long (87/80)
C: 24,0: Line too long (86/80)
C: 26,0: Line too long (83/80)
C: 49,0: Line too long (85/80)
C: 91,0: Line too long (89/80)
C:101,0: Line too long (98/80)
C:103,0: Line too long (92/80)
C:105,0: Line too long (92/80)
C:125,0: Line too long (81/80)
C: 1,0: Missing docstring
F: 2,0: Unable to import 'configparser'
F: 3,0: Unable to import 'slidelint'
C: 6,0: Invalid name "logger" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 7,0: Invalid name "user_messages" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 9,0: Invalid name "here" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
C: 12,0:enables_disables: Missing docstring
W: 13,14:enables_disables: Used builtin function 'filter'
W: 14,15:enables_disables: Used builtin function 'filter'
R: 18,0:LintConfig: Too many instance attributes (9/7)
C: 64,4:LintConfig.handle_disable_categories: Missing docstring
C: 88,4:LintConfig.handle_disable_checkers: Missing docstring
W:106,8:LintConfig.parse_config: Used builtin function 'map'
W:107,8:LintConfig.parse_config: Used builtin function 'map'
C:130,4:LintConfig.get_checker_args: Missing docstring
************* Module cli
C: 15,0: Line too long (81/80)
C: 18,0: Line too long (133/80)
C: 19,0: Line too long (108/80)
C: 20,0: Line too long (134/80)
C: 21,0: Line too long (109/80)
C: 66,0: Line too long (84/80)
C: 73,0: Line too long (100/80)
F: 24,0: Unable to import 'docopt'
F: 25,0: Unable to import 'slidelint.resources'
F: 26,0: Unable to import 'slidelint.config_parser'
F: 27,0: Unable to import 'slidelint.outputs'
F: 28,0: Unable to import 'slidelint.utils'
C: 31,0: Invalid name "logger" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$)
R: 34,0:lint: Too many arguments (6/5)
W: 54,4:lint: Used * or ** magic
W: 61,27:lint: Used * or ** magic
$ python bootstrap.py
Not SVN Repository
$ ./bin/buildout
Develop: '/home/tansell/foss/slidelint/.'
Not SVN Repository
Getting distribution for 'collective.recipe.template'.
Not SVN Repository
Got collective.recipe.template 1.10.
Uninstalling omelette.
Running uninstall recipe.
Uninstalling test.
Installing test.
Getting distribution for 'pylint'.
Not SVN Repository
warning: no files found matching '*.html' under directory 'doc'
warning: no files found matching '*.txt2' under directory 'test'
warning: no files found matching 'noext'
zip_safe flag not set; analyzing archive contents...
pylint.testutils: module references __file__
pylint.epylint: module references __file__
pylint.checkers.__init__: module references __path__
pylint.reporters.__init__: module references __path__
SyntaxError: ('invalid syntax', ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_exec_used_py30.py', 6, 22, "exec('a = 1', globals={})\n"))
SyntaxError: ('invalid syntax', ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_syntax_error.py', 1, 9, 'def toto\n'))
SyntaxError: ("'yield' outside function", ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_yield_outside_func.py', 3, None, 'yield 1\n'))
Sorry: IndentationError: ('expected an indented block', ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/syntax_error.py', 2, 5, "print 'hop'\n"))
/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_assert_2uple.py:4: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert (1 == 1, 2 == 2), "no error"
/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_assert_2uple.py:5: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert (1 == 1, 2 == 2) #this should generate a warning
/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_assert_2uple.py:7: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert (1 == 1, ), "no error"
/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_assert_2uple.py:8: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert (1 == 1, )
/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_assert_2uple.py:9: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert (1 == 1, 2 == 2, 3 == 5), "no error"
/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_assert_2uple.py:11: SyntaxWarning: assertion is always true, perhaps remove parentheses?
assert (True,'error msg') #this should generate a warning
SyntaxError: ("'continue' not properly in loop", ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_continue_not_in_loop.py', 8, None, 'continue\n'))
SyntaxError: ("'return' outside function", ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_return_outside_func.py', 3, None, 'return\n'))
SyntaxError: ("default 'except:' must be last", ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_w0705.py', 28, None, '__revision__ += 1\n'))
SyntaxError: ('from __future__ imports must occur at the beginning of the file', ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_3k_removed_stuff_py_30.py', 4, None, 'from __future__ import generators\n'))
SyntaxError: ('invalid syntax', ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_kwoa_py30.py', 3, 15, 'def function(*, foo):\n'))
SyntaxError: ("'return' with argument inside generator",)
SyntaxError: ('keyword argument repeated', ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_keyword_repeat.py', 8, None, 'function_default_arg(two=5, two=7)\n'))
SyntaxError: ('unknown encoding: IBO-8859-1', ('/home/tansell/foss/slidelint/eggs/tmp3ggNzm/pylint-1.0.0-py2.7.egg/pylint/test/input/func_unknown_encoding.py', 0, 0, None))
SyntaxError: ("duplicate argument '_' in function definition",)
src/slidelint/tests/checkers/languagetool_grammar/TestCheckerLanguageTool.py
src/slidelint/tests/checkers/low_contrast/TestCheckerTextReadability.py
def subprocess_helper(self, temp_dir, cmd):
config_file = os.path.join(temp_dir.path, 'tmp_file')
import subprocess
origing_popen = subprocess.Popen
with Replacer() as r:
def not_existing_program(*args, **kwargs):
return origing_popen(cmd, *args[1:], **kwargs)
r.replace('subprocess.Popen', not_existing_program)
readability.tranform2html(
temp_dir.path,
temp_dir.path, config_file)
After running the tests this file seemed to appear...
The test which downloads from github should not be run by default and should be it's own separate test.
def test_pip_instalation(self):
with tempdir.TempDir() as t:
with api.lcd(t):
run("virtualenv --no-site-packages .")
run("bin/pip install https://github.com/enkidulan/"
"slidelint/archive/master.tar.gz")
Put myself down as designer, and yourself down as code author.
Couple of things are slightly wrong about how you are using subprocess in the tool.
process = subprocess.Popen(
cmd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,)
If you are not writing anything to stdin, you shouldn't set it to subprocess.PIPE. Instead use subprocess.DEVNULL which under Python 2.7 can be created with;
subprocess.DEVNULL = open(os.devnull, 'rb+')
You should probably also redirect stderr to stdin by using subprocess.STDOUT
process = subprocess.Popen(
cmd,
stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True,)
This way process.stdout.readline() and similar will get the error output too.
You should check the return codes of the process.
if process.returncode != 0:
raise IOError("Program terminated with return code %s" % retcode)
You can't use process.wait() when you have stdout/stderr as subprocess.PIPE, otherwise if a lot of data it output to the stdout/stderr the process will hang until you read it. Use process.communicate() instead. See the giant red warning at http://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait
process1 = subprocess.Popen(cmd)
process1.wait() # Okay, output won't cause it to block
process1.communicate() # *NOT OKAY* - Didn't set stdout or stderr to PIPE
process2 = subprocess.Popen(cmd, stdout=subprocess.PIPE)
process2.wait() # *NOT OKAY* - If program produced a lot of stdout the process will never finish.
process2.communicate() # Okay!
You should also have some sort of timeout, incase the program hangs.
process1 = subprocess.Popen(cmd)
process1.wait(300) # Wait up to 5 minutes
if process1.returncode is None:
process1.kill()
raise IOError("Program failed to finish within 5 minutes!")
You should use the tempfile module if you are creating any temporary output to give to the command line program. Two reasons why;
import tempfile, subprocess
outputfile = tempfile.NamedTemporaryFile(prefix="slidelint", suffix="pdf")
myprocess = subprocess.Popen(["dosomething", "--output", outputfile.name])
myprocess.wait()
contents = file(outputfile.name, 'r').read()
outputfile = None # Temporary file gets deleted here. Will also get deleted if an exception or something is thrown.
There is also a way to create a temporary directory using tempfile.mkdtemp but you need to clean that up manually. Something like this works
import tempfile
import shutil
import atexit
import os
class TempDirectory:
def __init__(self):
self.name = tempfile.mkdtemp(prefix='slidelint')
# Just incase something weird is happening
atexit.register(self.cleanup_function)
# Weird default arguments are there to make sure that the needed modules are deleted *after* ourselves.
def cleanup_function(self, exists=os.path.exists, rmtree=shutil.rmtree):
def delete():
try:
if exists(self.name):
rmtree(self.name, ignore_errors=True)
except:
pass
return delete
def __del__(self):
self.cleanup_function()()
Please also create some tests which test when the subprocess fails, including
"Their wrote awesome code!" Should either be;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.