exercism-analysis 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/exercism-analysis.gemspec +30 -0
- data/lib/exercism-analysis.rb +38 -0
- data/lib/exercism-analysis/adapters/adapter.rb +23 -0
- data/lib/exercism-analysis/adapters/clojure.rb +13 -0
- data/lib/exercism-analysis/adapters/go.rb +19 -0
- data/lib/exercism-analysis/adapters/javascript.rb +13 -0
- data/lib/exercism-analysis/adapters/python.rb +13 -0
- data/lib/exercism-analysis/adapters/ruby.rb +19 -0
- data/lib/exercism-analysis/analysis.rb +18 -0
- data/lib/exercism-analysis/analyzers/analyzer.rb +54 -0
- data/lib/exercism-analysis/analyzers/clojure/kibit.rb +25 -0
- data/lib/exercism-analysis/analyzers/go/golint.rb +23 -0
- data/lib/exercism-analysis/analyzers/javascript/jslint.rb +24 -0
- data/lib/exercism-analysis/analyzers/python/pylint.rb +24 -0
- data/lib/exercism-analysis/analyzers/ruby/control_flow.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/enumerable_condition.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/for_loop.rb +29 -0
- data/lib/exercism-analysis/analyzers/ruby/indentation.rb +21 -0
- data/lib/exercism-analysis/analyzers/ruby/iter_mutation.rb +37 -0
- data/lib/exercism-analysis/analyzers/ruby/output.rb +20 -0
- data/lib/exercism-analysis/analyzers/ruby/range.rb +28 -0
- data/lib/exercism-analysis/analyzers/ruby/roodi.rb +19 -0
- data/lib/exercism-analysis/analyzers/ruby/send.rb +25 -0
- data/lib/exercism-analysis/analyzers/ruby/shebang.rb +23 -0
- data/lib/exercism-analysis/analyzers/ruby/tab.rb +38 -0
- data/lib/exercism-analysis/processors/call_processor.rb +39 -0
- data/lib/exercism-analysis/processors/control_flow_processor.rb +27 -0
- data/lib/exercism-analysis/processors/enumerable_condition_processor.rb +31 -0
- data/lib/exercism-analysis/processors/for_loop_processor.rb +21 -0
- data/lib/exercism-analysis/processors/indentation_processor.rb +69 -0
- data/lib/exercism-analysis/processors/iter_mutation_processor.rb +50 -0
- data/lib/exercism-analysis/processors/processor.rb +34 -0
- data/lib/exercism-analysis/processors/range_processor.rb +23 -0
- data/lib/exercism-analysis/processors/send_processor.rb +23 -0
- data/lib/exercism-analysis/templates/each_to_map.rb +29 -0
- data/lib/exercism-analysis/templates/each_to_select.rb +31 -0
- data/lib/exercism-analysis/templates/range_exclusive.rb +19 -0
- data/lib/exercism-analysis/templates/template.rb +29 -0
- data/vendor/clojure/kibit-runner/LICENSE +214 -0
- data/vendor/clojure/kibit-runner/project.clj +10 -0
- data/vendor/clojure/kibit-runner/src/kibit_runner/core.clj +17 -0
- data/vendor/clojure/kibit-runner/target/kibit-runner-0.1.0-SNAPSHOT-standalone.jar +0 -0
- data/vendor/clojure/kibit-runner/target/kibit-runner-0.1.0-SNAPSHOT.jar +0 -0
- data/vendor/clojure/kibit-runner/target/stale/extract-native.dependencies +1 -0
- data/vendor/go/src/github.com/golang/lint/LICENSE +27 -0
- data/vendor/go/src/github.com/golang/lint/README +59 -0
- data/vendor/go/src/github.com/golang/lint/golint/golint.go +67 -0
- data/vendor/go/src/github.com/golang/lint/lint.go +1061 -0
- data/vendor/go/src/runner/golint_runner.go +23 -0
- data/vendor/javascript/jshint_runner.js +6 -0
- data/vendor/javascript/node_modules/jshint/README.md +47 -0
- data/vendor/javascript/node_modules/jshint/bin/apply +6 -0
- data/vendor/javascript/node_modules/jshint/bin/build +36 -0
- data/vendor/javascript/node_modules/jshint/bin/changelog +36 -0
- data/vendor/javascript/node_modules/jshint/bin/jshint +3 -0
- data/vendor/javascript/node_modules/jshint/bin/land +34 -0
- data/vendor/javascript/node_modules/jshint/data/ascii-identifier-data.js +22 -0
- data/vendor/javascript/node_modules/jshint/data/non-ascii-identifier-part-only.js +1570 -0
- data/vendor/javascript/node_modules/jshint/data/non-ascii-identifier-start.js +48477 -0
- data/vendor/javascript/node_modules/jshint/dist/jshint-rhino.js +60642 -0
- data/vendor/javascript/node_modules/jshint/dist/jshint.js +60525 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/README.md +196 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/cli.js +1139 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/cat.js +17 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/command.js +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/echo.js +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/glob.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/long_desc.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/progress.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/sort.js +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/spinner.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/static.coffee +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/examples/static.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/index.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/LICENSE +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/README.md +250 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/examples/g.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/glob.js +728 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/package.json +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/package.json +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/bash-results.json +351 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/globstar-match.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/mark.js +118 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/new-glob-optional-options.js +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/readme-issue.js +36 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/root.js +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/stat.js +32 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/cli/package.json +70 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/LICENCE +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/README.md +33 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/index.js +86 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/LICENCE +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/README.md +45 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/index.js +5 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/package.json +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/seed.js +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/test/index.js +28 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/node_modules/date-now/test/static/index.html +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/package.json +88 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/index.js +67 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/static/index.html +12 -0
- data/vendor/javascript/node_modules/jshint/node_modules/console-browserify/test/static/test-adapter.js +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/Gruntfile.js +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/LICENSE-MIT +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/README.md +75 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/lib/exit.js +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/package.json +69 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/exit_test.js +121 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stdout-stderr.txt +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/10-stdout.txt +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stderr.txt +100 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stdout-stderr.txt +200 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/100-stdout.txt +100 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stderr.txt +1000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +2000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/1000-stdout.txt +1000 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/create-files.sh +8 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/log-broken.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/exit/test/fixtures/log.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/LICENSE +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/README.md +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/CollectingHandler.js +55 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/FeedHandler.js +95 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Parser.js +337 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/ProxyHandler.js +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Stream.js +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/Tokenizer.js +891 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/WritableStream.js +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/lib/index.js +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/index.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/package.json +40 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domelementtype/readme.md +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/index.js +211 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/package.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/readme.md +102 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/01-basic.json +57 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/02-single_tag_1.json +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/03-single_tag_2.json +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/04-unescaped_in_script.json +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/05-tags_in_comment.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/06-comment_in_script.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/07-unescaped_in_style.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/08-extra_spaces_in_tag.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/09-unquoted_attrib.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/10-singular_attribute.json +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/11-text_outside_tags.json +40 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/12-text_only.json +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/13-comment_in_text.json +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/14-comment_in_text_in_script.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/15-non-verbose.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/16-normalize_whitespace.json +47 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/17-xml_namespace.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/18-enforce_empty_tags.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/19-ignore_empty_tags.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/20-template_script_tags.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/21-conditional_comments.json +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/22-lowercase_tags.json +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/cases/23-dom-lvl1.json +121 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domhandler/test/tests.js +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/index.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +141 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +87 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +77 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +94 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +93 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +24 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/package.json +71 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/readme.md +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/fixture.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/tests/helpers.js +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/tests/legacy.js +119 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/domutils/test/utils.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/LICENSE +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/index.js +31 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/decode.js +72 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/decode_codepoint.js +26 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/lib/encode.js +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/decode.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/entities.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/legacy.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/maps/xml.json +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/package.json +79 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/readme.md +31 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/test/mocha.opts +2 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/entities/test/test.js +150 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/LICENSE +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/README.md +15 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/duplex.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/float.patch +923 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_duplex.js +89 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_passthrough.js +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_readable.js +944 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_transform.js +209 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/lib/_stream_writable.js +472 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/README.md +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/float.patch +604 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +107 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/package.json +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/core-util-is/util.js +106 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/LICENSE +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/README.md +42 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/inherits.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/package.json +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/inherits/test.js +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/README.md +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/build/build.js +209 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/component.json +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/index.js +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/isarray/package.json +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/LICENSE +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/README.md +7 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/index.js +200 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/node_modules/string_decoder/package.json +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/package.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/passthrough.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/readable.js +7 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/transform.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/node_modules/readable-stream/writable.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/package.json +90 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/01-events.js +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/02-stream.js +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/03-feed.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Atom_Example.xml +25 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Attributes.html +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/Basic.html +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/RDF_Example.xml +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Documents/RSS_Example.xml +48 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/01-simple.json +44 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/02-template.json +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/03-lowercase_tags.json +46 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/04-cdata.json +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/05-cdata-special.json +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/06-leading-lt.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/07-self-closing.json +67 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/08-implicit-close-tags.json +59 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/09-attributes.json +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/10-crazy-attrib.json +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/11-script_in_script.json +54 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/12-long-comment-end.json +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/13-long-cdata-end.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/14-implicit-open-tags.json +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/15-lt-whitespace.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/16-double_attribs.json +45 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/17-numeric_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/18-legacy_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/19-named_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/20-xml_entities.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/21-entity_in_attribute.json +38 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/22-double_brackets.json +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/23-legacy_entity_fail.json +16 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/24-special_special.json +133 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/25-empty_tag_name.json +13 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/26-not-quite-closed.json +35 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/27-entities_in_attributes.json +62 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/28-cdata_in_html.json +9 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/29-comment_edge-cases.json +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Events/30-cdata_edge-cases.json +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/01-rss.js +34 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/02-atom.js +18 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Feeds/03-rdf.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/01-basic.json +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/02-RSS.json +1093 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/03-Atom.json +644 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/04-RDF.json +1399 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/Stream/05-Attributes.json +354 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/api.js +63 -0
- data/vendor/javascript/node_modules/jshint/node_modules/htmlparser2/test/test-helper.js +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/README.md +218 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/minimatch.js +1061 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/package.json +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/package.json +58 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/package.json +57 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/javascript/node_modules/jshint/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/LICENSE +26 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/README.md +569 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/bin/shjs +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/global.js +3 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/make.js +47 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/package.json +61 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/scripts/generate-docs.js +21 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/scripts/run-tests.js +50 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/shell.js +157 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cat.js +43 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cd.js +19 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/chmod.js +208 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/common.js +203 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/cp.js +201 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/dirs.js +191 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/echo.js +20 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/error.js +10 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/exec.js +181 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/find.js +51 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/grep.js +52 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/ln.js +53 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/ls.js +126 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/mkdir.js +68 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/mv.js +80 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/popd.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/pushd.js +1 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/pwd.js +11 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/rm.js +145 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/sed.js +43 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/tempdir.js +56 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/test.js +85 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/to.js +29 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/toEnd.js +29 -0
- data/vendor/javascript/node_modules/jshint/node_modules/shelljs/src/which.js +83 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/cli.js +41 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/package.json +76 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/readme.md +74 -0
- data/vendor/javascript/node_modules/jshint/node_modules/strip-json-comments/strip-json-comments.js +64 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/LICENSE +23 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/README.md +22 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/package.json +66 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/underscore-min.js +6 -0
- data/vendor/javascript/node_modules/jshint/node_modules/underscore/underscore.js +1343 -0
- data/vendor/javascript/node_modules/jshint/package.json +80 -0
- data/vendor/javascript/node_modules/jshint/src/cli.js +731 -0
- data/vendor/javascript/node_modules/jshint/src/jshint.js +5023 -0
- data/vendor/javascript/node_modules/jshint/src/lex.js +1650 -0
- data/vendor/javascript/node_modules/jshint/src/messages.js +223 -0
- data/vendor/javascript/node_modules/jshint/src/platforms/rhino.js +115 -0
- data/vendor/javascript/node_modules/jshint/src/reg.js +38 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/checkstyle.js +81 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/default.js +34 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/jslint_xml.js +57 -0
- data/vendor/javascript/node_modules/jshint/src/reporters/non_error.js +52 -0
- data/vendor/javascript/node_modules/jshint/src/state.js +28 -0
- data/vendor/javascript/node_modules/jshint/src/style.js +143 -0
- data/vendor/javascript/node_modules/jshint/src/vars.js +658 -0
- data/vendor/python/astroid/COPYING +339 -0
- data/vendor/python/astroid/COPYING.LESSER +510 -0
- data/vendor/python/astroid/ChangeLog +574 -0
- data/vendor/python/astroid/MANIFEST.in +9 -0
- data/vendor/python/astroid/README +56 -0
- data/vendor/python/astroid/README.Python3 +26 -0
- data/vendor/python/astroid/__init__.py +118 -0
- data/vendor/python/astroid/__init__.pyc +0 -0
- data/vendor/python/astroid/__pkginfo__.py +48 -0
- data/vendor/python/astroid/__pkginfo__.pyc +0 -0
- data/vendor/python/astroid/announce.txt +23 -0
- data/vendor/python/astroid/as_string.py +496 -0
- data/vendor/python/astroid/as_string.pyc +0 -0
- data/vendor/python/astroid/bases.py +618 -0
- data/vendor/python/astroid/bases.pyc +0 -0
- data/vendor/python/astroid/brain/py2gi.py +159 -0
- data/vendor/python/astroid/brain/py2gi.pyc +0 -0
- data/vendor/python/astroid/brain/py2mechanize.py +20 -0
- data/vendor/python/astroid/brain/py2mechanize.pyc +0 -0
- data/vendor/python/astroid/brain/py2qt4.py +25 -0
- data/vendor/python/astroid/brain/py2qt4.pyc +0 -0
- data/vendor/python/astroid/brain/py2stdlib.py +252 -0
- data/vendor/python/astroid/brain/py2stdlib.pyc +0 -0
- data/vendor/python/astroid/builder.py +238 -0
- data/vendor/python/astroid/builder.pyc +0 -0
- data/vendor/python/astroid/exceptions.py +51 -0
- data/vendor/python/astroid/exceptions.pyc +0 -0
- data/vendor/python/astroid/inference.py +393 -0
- data/vendor/python/astroid/inference.pyc +0 -0
- data/vendor/python/astroid/inspector.py +275 -0
- data/vendor/python/astroid/manager.py +336 -0
- data/vendor/python/astroid/manager.pyc +0 -0
- data/vendor/python/astroid/mixins.py +122 -0
- data/vendor/python/astroid/mixins.pyc +0 -0
- data/vendor/python/astroid/node_classes.py +928 -0
- data/vendor/python/astroid/node_classes.pyc +0 -0
- data/vendor/python/astroid/nodes.py +73 -0
- data/vendor/python/astroid/nodes.pyc +0 -0
- data/vendor/python/astroid/protocols.py +322 -0
- data/vendor/python/astroid/protocols.pyc +0 -0
- data/vendor/python/astroid/raw_building.py +361 -0
- data/vendor/python/astroid/raw_building.pyc +0 -0
- data/vendor/python/astroid/rebuilder.py +954 -0
- data/vendor/python/astroid/rebuilder.pyc +0 -0
- data/vendor/python/astroid/scoped_nodes.py +1118 -0
- data/vendor/python/astroid/scoped_nodes.pyc +0 -0
- data/vendor/python/astroid/setup.py +184 -0
- data/vendor/python/astroid/tox.ini +10 -0
- data/vendor/python/astroid/utils.py +236 -0
- data/vendor/python/astroid/utils.pyc +0 -0
- data/vendor/python/logilab/__init__.py +0 -0
- data/vendor/python/logilab/__init__.pyc +0 -0
- data/vendor/python/logilab/common/COPYING +339 -0
- data/vendor/python/logilab/common/COPYING.LESSER +510 -0
- data/vendor/python/logilab/common/ChangeLog +1517 -0
- data/vendor/python/logilab/common/MANIFEST.in +13 -0
- data/vendor/python/logilab/common/README +185 -0
- data/vendor/python/logilab/common/README.Python3 +29 -0
- data/vendor/python/logilab/common/__init__.py +171 -0
- data/vendor/python/logilab/common/__init__.pyc +0 -0
- data/vendor/python/logilab/common/__pkginfo__.py +53 -0
- data/vendor/python/logilab/common/__pkginfo__.pyc +0 -0
- data/vendor/python/logilab/common/announce.txt +25 -0
- data/vendor/python/logilab/common/bin/pytest +7 -0
- data/vendor/python/logilab/common/bin/pytest.bat +17 -0
- data/vendor/python/logilab/common/cache.py +114 -0
- data/vendor/python/logilab/common/changelog.py +236 -0
- data/vendor/python/logilab/common/changelog.pyc +0 -0
- data/vendor/python/logilab/common/clcommands.py +332 -0
- data/vendor/python/logilab/common/cli.py +208 -0
- data/vendor/python/logilab/common/compat.py +243 -0
- data/vendor/python/logilab/common/compat.pyc +0 -0
- data/vendor/python/logilab/common/configuration.py +1094 -0
- data/vendor/python/logilab/common/configuration.pyc +0 -0
- data/vendor/python/logilab/common/contexts.py +5 -0
- data/vendor/python/logilab/common/corbautils.py +117 -0
- data/vendor/python/logilab/common/daemon.py +100 -0
- data/vendor/python/logilab/common/date.py +333 -0
- data/vendor/python/logilab/common/dbf.py +229 -0
- data/vendor/python/logilab/common/debugger.py +210 -0
- data/vendor/python/logilab/common/decorators.py +281 -0
- data/vendor/python/logilab/common/decorators.pyc +0 -0
- data/vendor/python/logilab/common/deprecation.py +188 -0
- data/vendor/python/logilab/common/deprecation.pyc +0 -0
- data/vendor/python/logilab/common/fileutils.py +402 -0
- data/vendor/python/logilab/common/graph.py +276 -0
- data/vendor/python/logilab/common/graph.pyc +0 -0
- data/vendor/python/logilab/common/hg.py +130 -0
- data/vendor/python/logilab/common/interface.py +71 -0
- data/vendor/python/logilab/common/interface.pyc +0 -0
- data/vendor/python/logilab/common/logging_ext.py +193 -0
- data/vendor/python/logilab/common/modutils.py +695 -0
- data/vendor/python/logilab/common/modutils.pyc +0 -0
- data/vendor/python/logilab/common/optik_ext.py +391 -0
- data/vendor/python/logilab/common/optik_ext.pyc +0 -0
- data/vendor/python/logilab/common/optparser.py +90 -0
- data/vendor/python/logilab/common/proc.py +277 -0
- data/vendor/python/logilab/common/pyro_ext.py +180 -0
- data/vendor/python/logilab/common/pytest.py +1177 -0
- data/vendor/python/logilab/common/python-logilab-common.spec +184 -0
- data/vendor/python/logilab/common/registry.py +1113 -0
- data/vendor/python/logilab/common/setup.cfg +3 -0
- data/vendor/python/logilab/common/setup.py +189 -0
- data/vendor/python/logilab/common/shellutils.py +455 -0
- data/vendor/python/logilab/common/sphinx_ext.py +87 -0
- data/vendor/python/logilab/common/sphinxutils.py +122 -0
- data/vendor/python/logilab/common/table.py +925 -0
- data/vendor/python/logilab/common/tasksqueue.py +100 -0
- data/vendor/python/logilab/common/textutils.py +534 -0
- data/vendor/python/logilab/common/textutils.pyc +0 -0
- data/vendor/python/logilab/common/tree.py +369 -0
- data/vendor/python/logilab/common/tree.pyc +0 -0
- data/vendor/python/logilab/common/umessage.py +190 -0
- data/vendor/python/logilab/common/ureports/__init__.py +174 -0
- data/vendor/python/logilab/common/ureports/__init__.pyc +0 -0
- data/vendor/python/logilab/common/ureports/docbook_writer.py +139 -0
- data/vendor/python/logilab/common/ureports/html_writer.py +131 -0
- data/vendor/python/logilab/common/ureports/html_writer.pyc +0 -0
- data/vendor/python/logilab/common/ureports/nodes.py +201 -0
- data/vendor/python/logilab/common/ureports/nodes.pyc +0 -0
- data/vendor/python/logilab/common/ureports/text_writer.py +140 -0
- data/vendor/python/logilab/common/ureports/text_writer.pyc +0 -0
- data/vendor/python/logilab/common/urllib2ext.py +87 -0
- data/vendor/python/logilab/common/vcgutils.py +216 -0
- data/vendor/python/logilab/common/visitor.py +107 -0
- data/vendor/python/logilab/common/visitor.pyc +0 -0
- data/vendor/python/logilab/common/xmlrpcutils.py +131 -0
- data/vendor/python/logilab/common/xmlutils.py +61 -0
- data/vendor/python/pylint/CONTRIBUTORS.txt +38 -0
- data/vendor/python/pylint/COPYING +340 -0
- data/vendor/python/pylint/ChangeLog +1437 -0
- data/vendor/python/pylint/DEPENDS +3 -0
- data/vendor/python/pylint/MANIFEST.in +14 -0
- data/vendor/python/pylint/README +50 -0
- data/vendor/python/pylint/README.Python3 +37 -0
- data/vendor/python/pylint/__init__.py +44 -0
- data/vendor/python/pylint/__init__.pyc +0 -0
- data/vendor/python/pylint/__main__.py +3 -0
- data/vendor/python/pylint/__pkginfo__.py +74 -0
- data/vendor/python/pylint/__pkginfo__.pyc +0 -0
- data/vendor/python/pylint/bin/epylint +3 -0
- data/vendor/python/pylint/bin/epylint.bat +5 -0
- data/vendor/python/pylint/bin/pylint +3 -0
- data/vendor/python/pylint/bin/pylint-gui +3 -0
- data/vendor/python/pylint/bin/pylint-gui.bat +5 -0
- data/vendor/python/pylint/bin/pylint.bat +5 -0
- data/vendor/python/pylint/bin/pyreverse +3 -0
- data/vendor/python/pylint/bin/pyreverse.bat +5 -0
- data/vendor/python/pylint/bin/symilar +3 -0
- data/vendor/python/pylint/bin/symilar.bat +5 -0
- data/vendor/python/pylint/checkers/__init__.py +145 -0
- data/vendor/python/pylint/checkers/__init__.pyc +0 -0
- data/vendor/python/pylint/checkers/base.py +1141 -0
- data/vendor/python/pylint/checkers/base.pyc +0 -0
- data/vendor/python/pylint/checkers/classes.py +792 -0
- data/vendor/python/pylint/checkers/classes.pyc +0 -0
- data/vendor/python/pylint/checkers/design_analysis.py +367 -0
- data/vendor/python/pylint/checkers/design_analysis.pyc +0 -0
- data/vendor/python/pylint/checkers/exceptions.py +306 -0
- data/vendor/python/pylint/checkers/exceptions.pyc +0 -0
- data/vendor/python/pylint/checkers/format.py +943 -0
- data/vendor/python/pylint/checkers/format.pyc +0 -0
- data/vendor/python/pylint/checkers/imports.py +394 -0
- data/vendor/python/pylint/checkers/imports.pyc +0 -0
- data/vendor/python/pylint/checkers/logging.py +213 -0
- data/vendor/python/pylint/checkers/logging.pyc +0 -0
- data/vendor/python/pylint/checkers/misc.py +90 -0
- data/vendor/python/pylint/checkers/misc.pyc +0 -0
- data/vendor/python/pylint/checkers/newstyle.py +151 -0
- data/vendor/python/pylint/checkers/newstyle.pyc +0 -0
- data/vendor/python/pylint/checkers/raw_metrics.py +129 -0
- data/vendor/python/pylint/checkers/raw_metrics.pyc +0 -0
- data/vendor/python/pylint/checkers/similar.py +365 -0
- data/vendor/python/pylint/checkers/similar.pyc +0 -0
- data/vendor/python/pylint/checkers/stdlib.py +69 -0
- data/vendor/python/pylint/checkers/stdlib.pyc +0 -0
- data/vendor/python/pylint/checkers/strings.py +304 -0
- data/vendor/python/pylint/checkers/strings.pyc +0 -0
- data/vendor/python/pylint/checkers/typecheck.py +451 -0
- data/vendor/python/pylint/checkers/typecheck.pyc +0 -0
- data/vendor/python/pylint/checkers/utils.py +416 -0
- data/vendor/python/pylint/checkers/utils.pyc +0 -0
- data/vendor/python/pylint/checkers/variables.py +741 -0
- data/vendor/python/pylint/checkers/variables.pyc +0 -0
- data/vendor/python/pylint/config.py +156 -0
- data/vendor/python/pylint/config.pyc +0 -0
- data/vendor/python/pylint/epylint.py +175 -0
- data/vendor/python/pylint/gui.py +508 -0
- data/vendor/python/pylint/interfaces.py +72 -0
- data/vendor/python/pylint/interfaces.pyc +0 -0
- data/vendor/python/pylint/lint.py +1106 -0
- data/vendor/python/pylint/lint.pyc +0 -0
- data/vendor/python/pylint/pyreverse/__init__.py +5 -0
- data/vendor/python/pylint/pyreverse/diadefslib.py +233 -0
- data/vendor/python/pylint/pyreverse/diagrams.py +247 -0
- data/vendor/python/pylint/pyreverse/main.py +124 -0
- data/vendor/python/pylint/pyreverse/utils.py +131 -0
- data/vendor/python/pylint/pyreverse/writer.py +199 -0
- data/vendor/python/pylint/reporters/__init__.py +138 -0
- data/vendor/python/pylint/reporters/__init__.pyc +0 -0
- data/vendor/python/pylint/reporters/guireporter.py +28 -0
- data/vendor/python/pylint/reporters/guireporter.pyc +0 -0
- data/vendor/python/pylint/reporters/html.py +70 -0
- data/vendor/python/pylint/reporters/html.pyc +0 -0
- data/vendor/python/pylint/reporters/text.py +143 -0
- data/vendor/python/pylint/reporters/text.pyc +0 -0
- data/vendor/python/pylint/setup.cfg +3 -0
- data/vendor/python/pylint/setup.py +203 -0
- data/vendor/python/pylint/tox.ini +10 -0
- data/vendor/python/pylint/utils.py +744 -0
- data/vendor/python/pylint/utils.pyc +0 -0
- data/vendor/python/pylint_runner.py +22 -0
- metadata +675 -0
|
Binary file
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
|
|
2
|
+
# This program is free software; you can redistribute it and/or modify it under
|
|
3
|
+
# the terms of the GNU General Public License as published by the Free Software
|
|
4
|
+
# Foundation; either version 2 of the License, or (at your option) any later
|
|
5
|
+
# version.
|
|
6
|
+
#
|
|
7
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
8
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
9
|
+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
|
|
10
|
+
#
|
|
11
|
+
# You should have received a copy of the GNU General Public License along with
|
|
12
|
+
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
13
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
14
|
+
"""utilities for Pylint configuration :
|
|
15
|
+
|
|
16
|
+
* pylintrc
|
|
17
|
+
* pylint.d (PYLINTHOME)
|
|
18
|
+
"""
|
|
19
|
+
from __future__ import with_statement
|
|
20
|
+
|
|
21
|
+
import pickle
|
|
22
|
+
import os
|
|
23
|
+
import sys
|
|
24
|
+
from os.path import exists, isfile, join, expanduser, abspath, dirname
|
|
25
|
+
|
|
26
|
+
# pylint home is used to save old runs results ################################
|
|
27
|
+
|
|
28
|
+
USER_HOME = expanduser('~')
|
|
29
|
+
if 'PYLINTHOME' in os.environ:
|
|
30
|
+
PYLINT_HOME = os.environ['PYLINTHOME']
|
|
31
|
+
if USER_HOME == '~':
|
|
32
|
+
USER_HOME = dirname(PYLINT_HOME)
|
|
33
|
+
elif USER_HOME == '~':
|
|
34
|
+
PYLINT_HOME = ".pylint.d"
|
|
35
|
+
else:
|
|
36
|
+
PYLINT_HOME = join(USER_HOME, '.pylint.d')
|
|
37
|
+
|
|
38
|
+
def get_pdata_path(base_name, recurs):
|
|
39
|
+
"""return the path of the file which should contain old search data for the
|
|
40
|
+
given base_name with the given options values
|
|
41
|
+
"""
|
|
42
|
+
base_name = base_name.replace(os.sep, '_')
|
|
43
|
+
return join(PYLINT_HOME, "%s%s%s"%(base_name, recurs, '.stats'))
|
|
44
|
+
|
|
45
|
+
def load_results(base):
|
|
46
|
+
"""try to unpickle and return data from file if it exists and is not
|
|
47
|
+
corrupted
|
|
48
|
+
|
|
49
|
+
return an empty dictionary if it doesn't exists
|
|
50
|
+
"""
|
|
51
|
+
data_file = get_pdata_path(base, 1)
|
|
52
|
+
try:
|
|
53
|
+
with open(data_file) as stream:
|
|
54
|
+
return pickle.load(stream)
|
|
55
|
+
except:
|
|
56
|
+
return {}
|
|
57
|
+
|
|
58
|
+
if sys.version_info < (3, 0):
|
|
59
|
+
_PICK_MOD = 'w'
|
|
60
|
+
else:
|
|
61
|
+
_PICK_MOD = 'wb'
|
|
62
|
+
|
|
63
|
+
def save_results(results, base):
|
|
64
|
+
"""pickle results"""
|
|
65
|
+
if not exists(PYLINT_HOME):
|
|
66
|
+
try:
|
|
67
|
+
os.mkdir(PYLINT_HOME)
|
|
68
|
+
except OSError:
|
|
69
|
+
print >> sys.stderr, 'Unable to create directory %s' % PYLINT_HOME
|
|
70
|
+
data_file = get_pdata_path(base, 1)
|
|
71
|
+
try:
|
|
72
|
+
with open(data_file, _PICK_MOD) as stream:
|
|
73
|
+
pickle.dump(results, stream)
|
|
74
|
+
except (IOError, OSError), ex:
|
|
75
|
+
print >> sys.stderr, 'Unable to create file %s: %s' % (data_file, ex)
|
|
76
|
+
|
|
77
|
+
# location of the configuration file ##########################################
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def find_pylintrc():
|
|
81
|
+
"""search the pylint rc file and return its path if it find it, else None
|
|
82
|
+
"""
|
|
83
|
+
# is there a pylint rc file in the current directory ?
|
|
84
|
+
if exists('pylintrc'):
|
|
85
|
+
return abspath('pylintrc')
|
|
86
|
+
if isfile('__init__.py'):
|
|
87
|
+
curdir = abspath(os.getcwd())
|
|
88
|
+
while isfile(join(curdir, '__init__.py')):
|
|
89
|
+
curdir = abspath(join(curdir, '..'))
|
|
90
|
+
if isfile(join(curdir, 'pylintrc')):
|
|
91
|
+
return join(curdir, 'pylintrc')
|
|
92
|
+
if 'PYLINTRC' in os.environ and exists(os.environ['PYLINTRC']):
|
|
93
|
+
pylintrc = os.environ['PYLINTRC']
|
|
94
|
+
else:
|
|
95
|
+
user_home = expanduser('~')
|
|
96
|
+
if user_home == '~' or user_home == '/root':
|
|
97
|
+
pylintrc = ".pylintrc"
|
|
98
|
+
else:
|
|
99
|
+
pylintrc = join(user_home, '.pylintrc')
|
|
100
|
+
if not isfile(pylintrc):
|
|
101
|
+
pylintrc = join(user_home, '.config', 'pylintrc')
|
|
102
|
+
if not isfile(pylintrc):
|
|
103
|
+
if isfile('/etc/pylintrc'):
|
|
104
|
+
pylintrc = '/etc/pylintrc'
|
|
105
|
+
else:
|
|
106
|
+
pylintrc = None
|
|
107
|
+
return pylintrc
|
|
108
|
+
|
|
109
|
+
PYLINTRC = find_pylintrc()
|
|
110
|
+
|
|
111
|
+
ENV_HELP = '''
|
|
112
|
+
The following environment variables are used:
|
|
113
|
+
* PYLINTHOME
|
|
114
|
+
Path to the directory where the persistent for the run will be stored. If
|
|
115
|
+
not found, it defaults to ~/.pylint.d/ or .pylint.d (in the current working
|
|
116
|
+
directory).
|
|
117
|
+
* PYLINTRC
|
|
118
|
+
Path to the configuration file. See the documentation for the method used
|
|
119
|
+
to search for configuration file.
|
|
120
|
+
''' % globals()
|
|
121
|
+
|
|
122
|
+
# evaluation messages #########################################################
|
|
123
|
+
|
|
124
|
+
def get_note_message(note):
|
|
125
|
+
"""return a message according to note
|
|
126
|
+
note is a float < 10 (10 is the highest note)
|
|
127
|
+
"""
|
|
128
|
+
assert note <= 10, "Note is %.2f. Either you cheated, or pylint's \
|
|
129
|
+
broken!" % note
|
|
130
|
+
if note < 0:
|
|
131
|
+
msg = 'You have to do something quick !'
|
|
132
|
+
elif note < 1:
|
|
133
|
+
msg = 'Hey! This is really dreadful. Or maybe pylint is buggy?'
|
|
134
|
+
elif note < 2:
|
|
135
|
+
msg = "Come on! You can't be proud of this code"
|
|
136
|
+
elif note < 3:
|
|
137
|
+
msg = 'Hum... Needs work.'
|
|
138
|
+
elif note < 4:
|
|
139
|
+
msg = 'Wouldn\'t you be a bit lazy?'
|
|
140
|
+
elif note < 5:
|
|
141
|
+
msg = 'A little more work would make it acceptable.'
|
|
142
|
+
elif note < 6:
|
|
143
|
+
msg = 'Just the bare minimum. Give it a bit more polish. '
|
|
144
|
+
elif note < 7:
|
|
145
|
+
msg = 'This is okay-ish, but I\'m sure you can do better.'
|
|
146
|
+
elif note < 8:
|
|
147
|
+
msg = 'If you commit now, people should not be making nasty \
|
|
148
|
+
comments about you on c.l.py'
|
|
149
|
+
elif note < 9:
|
|
150
|
+
msg = 'That\'s pretty good. Good work mate.'
|
|
151
|
+
elif note < 10:
|
|
152
|
+
msg = 'So close to being perfect...'
|
|
153
|
+
else:
|
|
154
|
+
msg = 'Wow ! Now this deserves our uttermost respect.\nPlease send \
|
|
155
|
+
your code to python-projects@logilab.org'
|
|
156
|
+
return msg
|
|
Binary file
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# -*- coding: utf-8; mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=python:et:sw=4:ts=4:sts=4
|
|
2
|
+
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
|
|
3
|
+
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
|
|
4
|
+
#
|
|
5
|
+
# This program is free software; you can redistribute it and/or modify it under
|
|
6
|
+
# the terms of the GNU General Public License as published by the Free Software
|
|
7
|
+
# Foundation; either version 2 of the License, or (at your option) any later
|
|
8
|
+
# version.
|
|
9
|
+
#
|
|
10
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
11
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
12
|
+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License along with
|
|
15
|
+
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
16
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
17
|
+
"""Emacs and Flymake compatible Pylint.
|
|
18
|
+
|
|
19
|
+
This script is for integration with emacs and is compatible with flymake mode.
|
|
20
|
+
|
|
21
|
+
epylint walks out of python packages before invoking pylint. This avoids
|
|
22
|
+
reporting import errors that occur when a module within a package uses the
|
|
23
|
+
absolute import path to get another module within this package.
|
|
24
|
+
|
|
25
|
+
For example:
|
|
26
|
+
- Suppose a package is structured as
|
|
27
|
+
|
|
28
|
+
a/__init__.py
|
|
29
|
+
a/b/x.py
|
|
30
|
+
a/c/y.py
|
|
31
|
+
|
|
32
|
+
- Then if y.py imports x as "from a.b import x" the following produces pylint
|
|
33
|
+
errors
|
|
34
|
+
|
|
35
|
+
cd a/c; pylint y.py
|
|
36
|
+
|
|
37
|
+
- The following obviously doesn't
|
|
38
|
+
|
|
39
|
+
pylint a/c/y.py
|
|
40
|
+
|
|
41
|
+
- As this script will be invoked by emacs within the directory of the file
|
|
42
|
+
we are checking we need to go out of it to avoid these false positives.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
You may also use py_run to run pylint with desired options and get back (or not)
|
|
46
|
+
its output.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
import sys, os, re
|
|
50
|
+
import os.path as osp
|
|
51
|
+
from subprocess import Popen, PIPE
|
|
52
|
+
|
|
53
|
+
def _get_env():
|
|
54
|
+
'''Extracts the environment PYTHONPATH and appends the current sys.path to
|
|
55
|
+
those.'''
|
|
56
|
+
env = dict(os.environ)
|
|
57
|
+
env['PYTHONPATH'] = os.pathsep.join(sys.path)
|
|
58
|
+
return env
|
|
59
|
+
|
|
60
|
+
def lint(filename, options=None):
|
|
61
|
+
"""Pylint the given file.
|
|
62
|
+
|
|
63
|
+
When run from emacs we will be in the directory of a file, and passed its
|
|
64
|
+
filename. If this file is part of a package and is trying to import other
|
|
65
|
+
modules from within its own package or another package rooted in a directory
|
|
66
|
+
below it, pylint will classify it as a failed import.
|
|
67
|
+
|
|
68
|
+
To get around this, we traverse down the directory tree to find the root of
|
|
69
|
+
the package this module is in. We then invoke pylint from this directory.
|
|
70
|
+
|
|
71
|
+
Finally, we must correct the filenames in the output generated by pylint so
|
|
72
|
+
Emacs doesn't become confused (it will expect just the original filename,
|
|
73
|
+
while pylint may extend it with extra directories if we've traversed down
|
|
74
|
+
the tree)
|
|
75
|
+
"""
|
|
76
|
+
# traverse downwards until we are out of a python package
|
|
77
|
+
full_path = osp.abspath(filename)
|
|
78
|
+
parent_path = osp.dirname(full_path)
|
|
79
|
+
child_path = osp.basename(full_path)
|
|
80
|
+
|
|
81
|
+
while parent_path != "/" and osp.exists(osp.join(parent_path, '__init__.py')):
|
|
82
|
+
child_path = osp.join(osp.basename(parent_path), child_path)
|
|
83
|
+
parent_path = osp.dirname(parent_path)
|
|
84
|
+
|
|
85
|
+
# Start pylint
|
|
86
|
+
# Ensure we use the python and pylint associated with the running epylint
|
|
87
|
+
from pylint import lint as lint_mod
|
|
88
|
+
lint_path = lint_mod.__file__
|
|
89
|
+
options = options or ['--disable=C,R,I']
|
|
90
|
+
cmd = [sys.executable, lint_path] + options + [
|
|
91
|
+
'--msg-template', '{path}:{line}: {category} ({msg_id}, {symbol}, {obj}) {msg}',
|
|
92
|
+
'-r', 'n', child_path]
|
|
93
|
+
process = Popen(cmd, stdout=PIPE, cwd=parent_path, env=_get_env(),
|
|
94
|
+
universal_newlines=True)
|
|
95
|
+
|
|
96
|
+
for line in process.stdout:
|
|
97
|
+
# remove pylintrc warning
|
|
98
|
+
if line.startswith("No config file found"):
|
|
99
|
+
continue
|
|
100
|
+
|
|
101
|
+
# modify the file name thats output to reverse the path traversal we made
|
|
102
|
+
parts = line.split(":")
|
|
103
|
+
if parts and parts[0] == child_path:
|
|
104
|
+
line = ":".join([filename] + parts[1:])
|
|
105
|
+
print line,
|
|
106
|
+
|
|
107
|
+
process.wait()
|
|
108
|
+
return process.returncode
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def py_run(command_options='', return_std=False, stdout=None, stderr=None,
|
|
112
|
+
script='epylint'):
|
|
113
|
+
"""Run pylint from python
|
|
114
|
+
|
|
115
|
+
``command_options`` is a string containing ``pylint`` command line options;
|
|
116
|
+
``return_std`` (boolean) indicates return of created standart output
|
|
117
|
+
and error (see below);
|
|
118
|
+
``stdout`` and ``stderr`` are 'file-like' objects in which standart output
|
|
119
|
+
could be written.
|
|
120
|
+
|
|
121
|
+
Calling agent is responsible for stdout/err management (creation, close).
|
|
122
|
+
Default standart output and error are those from sys,
|
|
123
|
+
or standalone ones (``subprocess.PIPE``) are used
|
|
124
|
+
if they are not set and ``return_std``.
|
|
125
|
+
|
|
126
|
+
If ``return_std`` is set to ``True``, this function returns a 2-uple
|
|
127
|
+
containing standart output and error related to created process,
|
|
128
|
+
as follows: ``(stdout, stderr)``.
|
|
129
|
+
|
|
130
|
+
A trivial usage could be as follows:
|
|
131
|
+
>>> py_run( '--version')
|
|
132
|
+
No config file found, using default configuration
|
|
133
|
+
pylint 0.18.1,
|
|
134
|
+
...
|
|
135
|
+
|
|
136
|
+
To silently run Pylint on a module, and get its standart output and error:
|
|
137
|
+
>>> (pylint_stdout, pylint_stderr) = py_run( 'module_name.py', True)
|
|
138
|
+
"""
|
|
139
|
+
# Create command line to call pylint
|
|
140
|
+
if os.name == 'nt':
|
|
141
|
+
script += '.bat'
|
|
142
|
+
command_line = script + ' ' + command_options
|
|
143
|
+
# Providing standart output and/or error if not set
|
|
144
|
+
if stdout is None:
|
|
145
|
+
if return_std:
|
|
146
|
+
stdout = PIPE
|
|
147
|
+
else:
|
|
148
|
+
stdout = sys.stdout
|
|
149
|
+
if stderr is None:
|
|
150
|
+
if return_std:
|
|
151
|
+
stderr = PIPE
|
|
152
|
+
else:
|
|
153
|
+
stderr = sys.stderr
|
|
154
|
+
# Call pylint in a subprocess
|
|
155
|
+
p = Popen(command_line, shell=True, stdout=stdout, stderr=stderr,
|
|
156
|
+
env=_get_env(), universal_newlines=True)
|
|
157
|
+
p.wait()
|
|
158
|
+
# Return standart output and error
|
|
159
|
+
if return_std:
|
|
160
|
+
return (p.stdout, p.stderr)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
def Run():
|
|
164
|
+
if len(sys.argv) == 1:
|
|
165
|
+
print "Usage: %s <filename> [options]" % sys.argv[0]
|
|
166
|
+
sys.exit(1)
|
|
167
|
+
elif not osp.exists(sys.argv[1]):
|
|
168
|
+
print "%s does not exist" % sys.argv[1]
|
|
169
|
+
sys.exit(1)
|
|
170
|
+
else:
|
|
171
|
+
sys.exit(lint(sys.argv[1], sys.argv[2:]))
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
if __name__ == '__main__':
|
|
175
|
+
Run()
|
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
|
|
2
|
+
# http://www.logilab.fr/ -- mailto:contact@logilab.fr
|
|
3
|
+
#
|
|
4
|
+
# This program is free software; you can redistribute it and/or modify it under
|
|
5
|
+
# the terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
# Foundation; either version 2 of the License, or (at your option) any later
|
|
7
|
+
# version.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful, but WITHOUT
|
|
10
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
11
|
+
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU General Public License along with
|
|
14
|
+
# this program; if not, write to the Free Software Foundation, Inc.,
|
|
15
|
+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
16
|
+
"""Tkinker gui for pylint"""
|
|
17
|
+
|
|
18
|
+
import os
|
|
19
|
+
import sys
|
|
20
|
+
import re
|
|
21
|
+
import Queue
|
|
22
|
+
from threading import Thread
|
|
23
|
+
from Tkinter import (Tk, Frame, Listbox, Entry, Label, Button, Scrollbar,
|
|
24
|
+
Checkbutton, Radiobutton, IntVar, StringVar)
|
|
25
|
+
from Tkinter import (TOP, LEFT, RIGHT, BOTTOM, END, X, Y, BOTH, SUNKEN, W,
|
|
26
|
+
HORIZONTAL, DISABLED, NORMAL, W)
|
|
27
|
+
from tkFileDialog import askopenfilename, askdirectory
|
|
28
|
+
|
|
29
|
+
import pylint.lint
|
|
30
|
+
from pylint.reporters.guireporter import GUIReporter
|
|
31
|
+
|
|
32
|
+
HOME = os.path.expanduser('~/')
|
|
33
|
+
HISTORY = '.pylint-gui-history'
|
|
34
|
+
COLORS = {'(I)':'lightblue',
|
|
35
|
+
'(C)':'blue', '(R)':'darkblue',
|
|
36
|
+
'(W)':'black', '(E)':'darkred',
|
|
37
|
+
'(F)':'red'}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def convert_to_string(msg):
|
|
41
|
+
"""make a string representation of a message"""
|
|
42
|
+
module_object = msg.module
|
|
43
|
+
if msg.obj:
|
|
44
|
+
module_object += ".%s" % msg.obj
|
|
45
|
+
return "(%s) %s [%d]: %s" % (msg.C, module_object, msg.line, msg.msg)
|
|
46
|
+
|
|
47
|
+
class BasicStream(object):
|
|
48
|
+
'''
|
|
49
|
+
used in gui reporter instead of writing to stdout, it is written to
|
|
50
|
+
this stream and saved in contents
|
|
51
|
+
'''
|
|
52
|
+
def __init__(self, gui):
|
|
53
|
+
"""init"""
|
|
54
|
+
self.curline = ""
|
|
55
|
+
self.gui = gui
|
|
56
|
+
self.contents = []
|
|
57
|
+
self.outdict = {}
|
|
58
|
+
self.currout = None
|
|
59
|
+
self.next_title = None
|
|
60
|
+
|
|
61
|
+
def write(self, text):
|
|
62
|
+
"""write text to the stream"""
|
|
63
|
+
if re.match('^--+$', text.strip()) or re.match('^==+$', text.strip()):
|
|
64
|
+
if self.currout:
|
|
65
|
+
self.outdict[self.currout].remove(self.next_title)
|
|
66
|
+
self.outdict[self.currout].pop()
|
|
67
|
+
self.currout = self.next_title
|
|
68
|
+
self.outdict[self.currout] = ['']
|
|
69
|
+
|
|
70
|
+
if text.strip():
|
|
71
|
+
self.next_title = text.strip()
|
|
72
|
+
|
|
73
|
+
if text.startswith(os.linesep):
|
|
74
|
+
self.contents.append('')
|
|
75
|
+
if self.currout:
|
|
76
|
+
self.outdict[self.currout].append('')
|
|
77
|
+
self.contents[-1] += text.strip(os.linesep)
|
|
78
|
+
if self.currout:
|
|
79
|
+
self.outdict[self.currout][-1] += text.strip(os.linesep)
|
|
80
|
+
if text.endswith(os.linesep) and text.strip():
|
|
81
|
+
self.contents.append('')
|
|
82
|
+
if self.currout:
|
|
83
|
+
self.outdict[self.currout].append('')
|
|
84
|
+
|
|
85
|
+
def fix_contents(self):
|
|
86
|
+
"""finalize what the contents of the dict should look like before output"""
|
|
87
|
+
for item in self.outdict:
|
|
88
|
+
num_empty = self.outdict[item].count('')
|
|
89
|
+
for _ in xrange(num_empty):
|
|
90
|
+
self.outdict[item].remove('')
|
|
91
|
+
if self.outdict[item]:
|
|
92
|
+
self.outdict[item].pop(0)
|
|
93
|
+
|
|
94
|
+
def output_contents(self):
|
|
95
|
+
"""output contents of dict to the gui, and set the rating"""
|
|
96
|
+
self.fix_contents()
|
|
97
|
+
self.gui.tabs = self.outdict
|
|
98
|
+
try:
|
|
99
|
+
self.gui.rating.set(self.outdict['Global evaluation'][0])
|
|
100
|
+
except:
|
|
101
|
+
self.gui.rating.set('Error')
|
|
102
|
+
self.gui.refresh_results_window()
|
|
103
|
+
|
|
104
|
+
#reset stream variables for next run
|
|
105
|
+
self.contents = []
|
|
106
|
+
self.outdict = {}
|
|
107
|
+
self.currout = None
|
|
108
|
+
self.next_title = None
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class LintGui(object):
|
|
112
|
+
"""Build and control a window to interact with pylint"""
|
|
113
|
+
|
|
114
|
+
def __init__(self, root=None):
|
|
115
|
+
"""init"""
|
|
116
|
+
self.root = root or Tk()
|
|
117
|
+
self.root.title('Pylint')
|
|
118
|
+
#reporter
|
|
119
|
+
self.reporter = None
|
|
120
|
+
#message queue for output from reporter
|
|
121
|
+
self.msg_queue = Queue.Queue()
|
|
122
|
+
self.msgs = []
|
|
123
|
+
self.visible_msgs = []
|
|
124
|
+
self.filenames = []
|
|
125
|
+
self.rating = StringVar()
|
|
126
|
+
self.tabs = {}
|
|
127
|
+
self.report_stream = BasicStream(self)
|
|
128
|
+
#gui objects
|
|
129
|
+
self.lb_messages = None
|
|
130
|
+
self.showhistory = None
|
|
131
|
+
self.results = None
|
|
132
|
+
self.btnRun = None
|
|
133
|
+
self.information_box = None
|
|
134
|
+
self.convention_box = None
|
|
135
|
+
self.refactor_box = None
|
|
136
|
+
self.warning_box = None
|
|
137
|
+
self.error_box = None
|
|
138
|
+
self.fatal_box = None
|
|
139
|
+
self.txtModule = None
|
|
140
|
+
self.status = None
|
|
141
|
+
self.msg_type_dict = None
|
|
142
|
+
self.init_gui()
|
|
143
|
+
|
|
144
|
+
def init_gui(self):
|
|
145
|
+
"""init helper"""
|
|
146
|
+
#setting up frames
|
|
147
|
+
top_frame = Frame(self.root)
|
|
148
|
+
mid_frame = Frame(self.root)
|
|
149
|
+
radio_frame = Frame(self.root)
|
|
150
|
+
res_frame = Frame(self.root)
|
|
151
|
+
msg_frame = Frame(self.root)
|
|
152
|
+
check_frame = Frame(self.root)
|
|
153
|
+
history_frame = Frame(self.root)
|
|
154
|
+
btn_frame = Frame(self.root)
|
|
155
|
+
rating_frame = Frame(self.root)
|
|
156
|
+
top_frame.pack(side=TOP, fill=X)
|
|
157
|
+
mid_frame.pack(side=TOP, fill=X)
|
|
158
|
+
history_frame.pack(side=TOP, fill=BOTH, expand=True)
|
|
159
|
+
radio_frame.pack(side=TOP, fill=BOTH, expand=True)
|
|
160
|
+
rating_frame.pack(side=TOP, fill=BOTH, expand=True)
|
|
161
|
+
res_frame.pack(side=TOP, fill=BOTH, expand=True)
|
|
162
|
+
check_frame.pack(side=TOP, fill=BOTH, expand=True)
|
|
163
|
+
msg_frame.pack(side=TOP, fill=BOTH, expand=True)
|
|
164
|
+
btn_frame.pack(side=TOP, fill=X)
|
|
165
|
+
|
|
166
|
+
# Binding F5 application-wide to run lint
|
|
167
|
+
self.root.bind('<F5>', self.run_lint)
|
|
168
|
+
|
|
169
|
+
#Message ListBox
|
|
170
|
+
rightscrollbar = Scrollbar(msg_frame)
|
|
171
|
+
rightscrollbar.pack(side=RIGHT, fill=Y)
|
|
172
|
+
bottomscrollbar = Scrollbar(msg_frame, orient=HORIZONTAL)
|
|
173
|
+
bottomscrollbar.pack(side=BOTTOM, fill=X)
|
|
174
|
+
self.lb_messages = Listbox(msg_frame,
|
|
175
|
+
yscrollcommand=rightscrollbar.set,
|
|
176
|
+
xscrollcommand=bottomscrollbar.set,
|
|
177
|
+
bg="white")
|
|
178
|
+
self.lb_messages.bind("<Double-Button-1>", self.show_sourcefile)
|
|
179
|
+
self.lb_messages.pack(expand=True, fill=BOTH)
|
|
180
|
+
rightscrollbar.config(command=self.lb_messages.yview)
|
|
181
|
+
bottomscrollbar.config(command=self.lb_messages.xview)
|
|
182
|
+
|
|
183
|
+
#History ListBoxes
|
|
184
|
+
rightscrollbar2 = Scrollbar(history_frame)
|
|
185
|
+
rightscrollbar2.pack(side=RIGHT, fill=Y)
|
|
186
|
+
bottomscrollbar2 = Scrollbar(history_frame, orient=HORIZONTAL)
|
|
187
|
+
bottomscrollbar2.pack(side=BOTTOM, fill=X)
|
|
188
|
+
self.showhistory = Listbox(history_frame,
|
|
189
|
+
yscrollcommand=rightscrollbar2.set,
|
|
190
|
+
xscrollcommand=bottomscrollbar2.set,
|
|
191
|
+
bg="white")
|
|
192
|
+
self.showhistory.pack(expand=True, fill=BOTH)
|
|
193
|
+
rightscrollbar2.config(command=self.showhistory.yview)
|
|
194
|
+
bottomscrollbar2.config(command=self.showhistory.xview)
|
|
195
|
+
self.showhistory.bind('<Double-Button-1>', self.select_recent_file)
|
|
196
|
+
self.set_history_window()
|
|
197
|
+
|
|
198
|
+
#status bar
|
|
199
|
+
self.status = Label(self.root, text="", bd=1, relief=SUNKEN, anchor=W)
|
|
200
|
+
self.status.pack(side=BOTTOM, fill=X)
|
|
201
|
+
|
|
202
|
+
#labelbl_ratingls
|
|
203
|
+
lbl_rating_label = Label(rating_frame, text='Rating:')
|
|
204
|
+
lbl_rating_label.pack(side=LEFT)
|
|
205
|
+
lbl_rating = Label(rating_frame, textvariable=self.rating)
|
|
206
|
+
lbl_rating.pack(side=LEFT)
|
|
207
|
+
Label(mid_frame, text='Recently Used:').pack(side=LEFT)
|
|
208
|
+
Label(top_frame, text='Module or package').pack(side=LEFT)
|
|
209
|
+
|
|
210
|
+
#file textbox
|
|
211
|
+
self.txt_module = Entry(top_frame, background='white')
|
|
212
|
+
self.txt_module.bind('<Return>', self.run_lint)
|
|
213
|
+
self.txt_module.pack(side=LEFT, expand=True, fill=X)
|
|
214
|
+
|
|
215
|
+
#results box
|
|
216
|
+
rightscrollbar = Scrollbar(res_frame)
|
|
217
|
+
rightscrollbar.pack(side=RIGHT, fill=Y)
|
|
218
|
+
bottomscrollbar = Scrollbar(res_frame, orient=HORIZONTAL)
|
|
219
|
+
bottomscrollbar.pack(side=BOTTOM, fill=X)
|
|
220
|
+
self.results = Listbox(res_frame,
|
|
221
|
+
yscrollcommand=rightscrollbar.set,
|
|
222
|
+
xscrollcommand=bottomscrollbar.set,
|
|
223
|
+
bg="white", font="Courier")
|
|
224
|
+
self.results.pack(expand=True, fill=BOTH, side=BOTTOM)
|
|
225
|
+
rightscrollbar.config(command=self.results.yview)
|
|
226
|
+
bottomscrollbar.config(command=self.results.xview)
|
|
227
|
+
|
|
228
|
+
#buttons
|
|
229
|
+
Button(top_frame, text='Open', command=self.file_open).pack(side=LEFT)
|
|
230
|
+
Button(top_frame, text='Open Package',
|
|
231
|
+
command=(lambda: self.file_open(package=True))).pack(side=LEFT)
|
|
232
|
+
|
|
233
|
+
self.btnRun = Button(top_frame, text='Run', command=self.run_lint)
|
|
234
|
+
self.btnRun.pack(side=LEFT)
|
|
235
|
+
Button(btn_frame, text='Quit', command=self.quit).pack(side=BOTTOM)
|
|
236
|
+
|
|
237
|
+
#radio buttons
|
|
238
|
+
self.information_box = IntVar()
|
|
239
|
+
self.convention_box = IntVar()
|
|
240
|
+
self.refactor_box = IntVar()
|
|
241
|
+
self.warning_box = IntVar()
|
|
242
|
+
self.error_box = IntVar()
|
|
243
|
+
self.fatal_box = IntVar()
|
|
244
|
+
i = Checkbutton(check_frame, text="Information", fg=COLORS['(I)'],
|
|
245
|
+
variable=self.information_box, command=self.refresh_msg_window)
|
|
246
|
+
c = Checkbutton(check_frame, text="Convention", fg=COLORS['(C)'],
|
|
247
|
+
variable=self.convention_box, command=self.refresh_msg_window)
|
|
248
|
+
r = Checkbutton(check_frame, text="Refactor", fg=COLORS['(R)'],
|
|
249
|
+
variable=self.refactor_box, command=self.refresh_msg_window)
|
|
250
|
+
w = Checkbutton(check_frame, text="Warning", fg=COLORS['(W)'],
|
|
251
|
+
variable=self.warning_box, command=self.refresh_msg_window)
|
|
252
|
+
e = Checkbutton(check_frame, text="Error", fg=COLORS['(E)'],
|
|
253
|
+
variable=self.error_box, command=self.refresh_msg_window)
|
|
254
|
+
f = Checkbutton(check_frame, text="Fatal", fg=COLORS['(F)'],
|
|
255
|
+
variable=self.fatal_box, command=self.refresh_msg_window)
|
|
256
|
+
i.select()
|
|
257
|
+
c.select()
|
|
258
|
+
r.select()
|
|
259
|
+
w.select()
|
|
260
|
+
e.select()
|
|
261
|
+
f.select()
|
|
262
|
+
i.pack(side=LEFT)
|
|
263
|
+
c.pack(side=LEFT)
|
|
264
|
+
r.pack(side=LEFT)
|
|
265
|
+
w.pack(side=LEFT)
|
|
266
|
+
e.pack(side=LEFT)
|
|
267
|
+
f.pack(side=LEFT)
|
|
268
|
+
|
|
269
|
+
#check boxes
|
|
270
|
+
self.box = StringVar()
|
|
271
|
+
# XXX should be generated
|
|
272
|
+
report = Radiobutton(
|
|
273
|
+
radio_frame, text="Report", variable=self.box,
|
|
274
|
+
value="Report", command=self.refresh_results_window)
|
|
275
|
+
raw_met = Radiobutton(
|
|
276
|
+
radio_frame, text="Raw metrics", variable=self.box,
|
|
277
|
+
value="Raw metrics", command=self.refresh_results_window)
|
|
278
|
+
dup = Radiobutton(
|
|
279
|
+
radio_frame, text="Duplication", variable=self.box,
|
|
280
|
+
value="Duplication", command=self.refresh_results_window)
|
|
281
|
+
ext = Radiobutton(
|
|
282
|
+
radio_frame, text="External dependencies",
|
|
283
|
+
variable=self.box, value="External dependencies",
|
|
284
|
+
command=self.refresh_results_window)
|
|
285
|
+
stat = Radiobutton(
|
|
286
|
+
radio_frame, text="Statistics by type",
|
|
287
|
+
variable=self.box, value="Statistics by type",
|
|
288
|
+
command=self.refresh_results_window)
|
|
289
|
+
msg_cat = Radiobutton(
|
|
290
|
+
radio_frame, text="Messages by category",
|
|
291
|
+
variable=self.box, value="Messages by category",
|
|
292
|
+
command=self.refresh_results_window)
|
|
293
|
+
msg = Radiobutton(
|
|
294
|
+
radio_frame, text="Messages", variable=self.box,
|
|
295
|
+
value="Messages", command=self.refresh_results_window)
|
|
296
|
+
source_file = Radiobutton(
|
|
297
|
+
radio_frame, text="Source File", variable=self.box,
|
|
298
|
+
value="Source File", command=self.refresh_results_window)
|
|
299
|
+
report.select()
|
|
300
|
+
report.grid(column=0, row=0, sticky=W)
|
|
301
|
+
raw_met.grid(column=1, row=0, sticky=W)
|
|
302
|
+
dup.grid(column=2, row=0, sticky=W)
|
|
303
|
+
msg.grid(column=3, row=0, sticky=W)
|
|
304
|
+
stat.grid(column=0, row=1, sticky=W)
|
|
305
|
+
msg_cat.grid(column=1, row=1, sticky=W)
|
|
306
|
+
ext.grid(column=2, row=1, sticky=W)
|
|
307
|
+
source_file.grid(column=3, row=1, sticky=W)
|
|
308
|
+
|
|
309
|
+
#dictionary for check boxes and associated error term
|
|
310
|
+
self.msg_type_dict = {
|
|
311
|
+
'I': lambda: self.information_box.get() == 1,
|
|
312
|
+
'C': lambda: self.convention_box.get() == 1,
|
|
313
|
+
'R': lambda: self.refactor_box.get() == 1,
|
|
314
|
+
'E': lambda: self.error_box.get() == 1,
|
|
315
|
+
'W': lambda: self.warning_box.get() == 1,
|
|
316
|
+
'F': lambda: self.fatal_box.get() == 1
|
|
317
|
+
}
|
|
318
|
+
self.txt_module.focus_set()
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
def select_recent_file(self, event):
|
|
322
|
+
"""adds the selected file in the history listbox to the Module box"""
|
|
323
|
+
if not self.showhistory.size():
|
|
324
|
+
return
|
|
325
|
+
|
|
326
|
+
selected = self.showhistory.curselection()
|
|
327
|
+
item = self.showhistory.get(selected)
|
|
328
|
+
#update module
|
|
329
|
+
self.txt_module.delete(0, END)
|
|
330
|
+
self.txt_module.insert(0, item)
|
|
331
|
+
|
|
332
|
+
def refresh_msg_window(self):
|
|
333
|
+
"""refresh the message window with current output"""
|
|
334
|
+
#clear the window
|
|
335
|
+
self.lb_messages.delete(0, END)
|
|
336
|
+
self.visible_msgs = []
|
|
337
|
+
for msg in self.msgs:
|
|
338
|
+
if self.msg_type_dict.get(msg.C)():
|
|
339
|
+
self.visible_msgs.append(msg)
|
|
340
|
+
msg_str = convert_to_string(msg)
|
|
341
|
+
self.lb_messages.insert(END, msg_str)
|
|
342
|
+
fg_color = COLORS.get(msg_str[:3], 'black')
|
|
343
|
+
self.lb_messages.itemconfigure(END, fg=fg_color)
|
|
344
|
+
|
|
345
|
+
def refresh_results_window(self):
|
|
346
|
+
"""refresh the results window with current output"""
|
|
347
|
+
#clear the window
|
|
348
|
+
self.results.delete(0, END)
|
|
349
|
+
try:
|
|
350
|
+
for res in self.tabs[self.box.get()]:
|
|
351
|
+
self.results.insert(END, res)
|
|
352
|
+
except:
|
|
353
|
+
pass
|
|
354
|
+
|
|
355
|
+
def process_incoming(self):
|
|
356
|
+
"""process the incoming messages from running pylint"""
|
|
357
|
+
while self.msg_queue.qsize():
|
|
358
|
+
try:
|
|
359
|
+
msg = self.msg_queue.get(0)
|
|
360
|
+
if msg == "DONE":
|
|
361
|
+
self.report_stream.output_contents()
|
|
362
|
+
return False
|
|
363
|
+
|
|
364
|
+
#adding message to list of msgs
|
|
365
|
+
self.msgs.append(msg)
|
|
366
|
+
|
|
367
|
+
#displaying msg if message type is selected in check box
|
|
368
|
+
if self.msg_type_dict.get(msg.C)():
|
|
369
|
+
self.visible_msgs.append(msg)
|
|
370
|
+
msg_str = convert_to_string(msg)
|
|
371
|
+
self.lb_messages.insert(END, msg_str)
|
|
372
|
+
fg_color = COLORS.get(msg_str[:3], 'black')
|
|
373
|
+
self.lb_messages.itemconfigure(END, fg=fg_color)
|
|
374
|
+
|
|
375
|
+
except Queue.Empty:
|
|
376
|
+
pass
|
|
377
|
+
return True
|
|
378
|
+
|
|
379
|
+
def periodic_call(self):
|
|
380
|
+
"""determine when to unlock the run button"""
|
|
381
|
+
if self.process_incoming():
|
|
382
|
+
self.root.after(100, self.periodic_call)
|
|
383
|
+
else:
|
|
384
|
+
#enabling button so it can be run again
|
|
385
|
+
self.btnRun.config(state=NORMAL)
|
|
386
|
+
|
|
387
|
+
def mainloop(self):
|
|
388
|
+
"""launch the mainloop of the application"""
|
|
389
|
+
self.root.mainloop()
|
|
390
|
+
|
|
391
|
+
def quit(self, _=None):
|
|
392
|
+
"""quit the application"""
|
|
393
|
+
self.root.quit()
|
|
394
|
+
|
|
395
|
+
def halt(self):
|
|
396
|
+
"""program halt placeholder"""
|
|
397
|
+
return
|
|
398
|
+
|
|
399
|
+
def file_open(self, package=False, _=None):
|
|
400
|
+
"""launch a file browser"""
|
|
401
|
+
if not package:
|
|
402
|
+
filename = askopenfilename(parent=self.root, filetypes=[('pythonfiles', '*.py'),
|
|
403
|
+
('allfiles', '*')], title='Select Module')
|
|
404
|
+
else:
|
|
405
|
+
filename = askdirectory(title="Select A Folder", mustexist=1)
|
|
406
|
+
|
|
407
|
+
if filename == ():
|
|
408
|
+
return
|
|
409
|
+
|
|
410
|
+
self.txt_module.delete(0, END)
|
|
411
|
+
self.txt_module.insert(0, filename)
|
|
412
|
+
|
|
413
|
+
def update_filenames(self):
|
|
414
|
+
"""update the list of recent filenames"""
|
|
415
|
+
filename = self.txt_module.get()
|
|
416
|
+
if not filename:
|
|
417
|
+
filename = os.getcwd()
|
|
418
|
+
if filename+'\n' in self.filenames:
|
|
419
|
+
index = self.filenames.index(filename+'\n')
|
|
420
|
+
self.filenames.pop(index)
|
|
421
|
+
|
|
422
|
+
#ensure only 10 most recent are stored
|
|
423
|
+
if len(self.filenames) == 10:
|
|
424
|
+
self.filenames.pop()
|
|
425
|
+
self.filenames.insert(0, filename+'\n')
|
|
426
|
+
|
|
427
|
+
def set_history_window(self):
|
|
428
|
+
"""update the history window with info from the history file"""
|
|
429
|
+
#clear the window
|
|
430
|
+
self.showhistory.delete(0, END)
|
|
431
|
+
# keep the last 10 most recent files
|
|
432
|
+
try:
|
|
433
|
+
view_history = open(HOME+HISTORY, 'r')
|
|
434
|
+
for hist in view_history.readlines():
|
|
435
|
+
if not hist in self.filenames:
|
|
436
|
+
self.filenames.append(hist)
|
|
437
|
+
self.showhistory.insert(END, hist.split('\n')[0])
|
|
438
|
+
view_history.close()
|
|
439
|
+
except IOError:
|
|
440
|
+
# do nothing since history file will be created later
|
|
441
|
+
return
|
|
442
|
+
|
|
443
|
+
def run_lint(self, _=None):
|
|
444
|
+
"""launches pylint"""
|
|
445
|
+
self.update_filenames()
|
|
446
|
+
self.root.configure(cursor='watch')
|
|
447
|
+
self.reporter = GUIReporter(self, output=self.report_stream)
|
|
448
|
+
module = self.txt_module.get()
|
|
449
|
+
if not module:
|
|
450
|
+
module = os.getcwd()
|
|
451
|
+
|
|
452
|
+
#cleaning up msgs and windows
|
|
453
|
+
self.msgs = []
|
|
454
|
+
self.visible_msgs = []
|
|
455
|
+
self.lb_messages.delete(0, END)
|
|
456
|
+
self.tabs = {}
|
|
457
|
+
self.results.delete(0, END)
|
|
458
|
+
self.btnRun.config(state=DISABLED)
|
|
459
|
+
|
|
460
|
+
#setting up a worker thread to run pylint
|
|
461
|
+
worker = Thread(target=lint_thread, args=(module, self.reporter, self,))
|
|
462
|
+
self.periodic_call()
|
|
463
|
+
worker.start()
|
|
464
|
+
|
|
465
|
+
# Overwrite the .pylint-gui-history file with all the new recently added files
|
|
466
|
+
# in order from filenames but only save last 10 files
|
|
467
|
+
write_history = open(HOME+HISTORY, 'w')
|
|
468
|
+
write_history.writelines(self.filenames)
|
|
469
|
+
write_history.close()
|
|
470
|
+
self.set_history_window()
|
|
471
|
+
|
|
472
|
+
self.root.configure(cursor='')
|
|
473
|
+
|
|
474
|
+
def show_sourcefile(self, event=None):
|
|
475
|
+
selected = self.lb_messages.curselection()
|
|
476
|
+
if not selected:
|
|
477
|
+
return
|
|
478
|
+
|
|
479
|
+
msg = self.visible_msgs[int(selected[0])]
|
|
480
|
+
scroll = msg.line - 3
|
|
481
|
+
if scroll < 0:
|
|
482
|
+
scroll = 0
|
|
483
|
+
|
|
484
|
+
self.tabs["Source File"] = open(msg.path, "r").readlines()
|
|
485
|
+
self.box.set("Source File")
|
|
486
|
+
self.refresh_results_window()
|
|
487
|
+
self.results.yview(scroll)
|
|
488
|
+
self.results.select_set(msg.line - 1)
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
def lint_thread(module, reporter, gui):
|
|
492
|
+
"""thread for pylint"""
|
|
493
|
+
gui.status.text = "processing module(s)"
|
|
494
|
+
pylint.lint.Run(args=[module], reporter=reporter, exit=False)
|
|
495
|
+
gui.msg_queue.put("DONE")
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
def Run(args):
|
|
499
|
+
"""launch pylint gui from args"""
|
|
500
|
+
if args:
|
|
501
|
+
print 'USAGE: pylint-gui\n launch a simple pylint gui using Tk'
|
|
502
|
+
sys.exit(1)
|
|
503
|
+
gui = LintGui()
|
|
504
|
+
gui.mainloop()
|
|
505
|
+
sys.exit(0)
|
|
506
|
+
|
|
507
|
+
if __name__ == '__main__':
|
|
508
|
+
Run(sys.argv[1:])
|