Commit graph

797 commits

Author SHA1 Message Date
Ian Cordasco
fbbb3bece5 Ignore directories we do not want to run tests from 2016-03-17 09:16:22 -05:00
Ian Cordasco
09000762fb Rename test file to mirror actual class it is testing 2016-03-17 09:15:52 -05:00
Ian Cordasco
867727f304 Merge remote-tracking branch 'rewrite/master' into proposed/3.0 2016-03-15 16:00:19 -05:00
Ian Cordasco
784a70dd0e Move flake8 2 out of the way 2016-03-15 15:58:24 -05:00
Ian Cordasco
ee18ac981e Handle case where file was ignored 2016-03-15 14:39:43 -05:00
Ian Cordasco
0b063a1024 Run checks expecting an AST 2016-03-15 14:11:01 -05:00
Ian Cordasco
576d1f6c85 Bypass linecache by recording physical line 2016-03-15 14:10:05 -05:00
Ian Cordasco
666e1c2b06 Ensure the logical line is tracked on the processor 2016-03-15 12:27:05 -05:00
Ian Cordasco
19062c5e9c Wrap up multiprocessing work 2016-03-15 12:18:45 -05:00
Ian Cordasco
c0659d1a8c Catch Keyboard interruptions in our application
Add logging to our main application
2016-03-15 11:53:12 -05:00
Ian Cordasco
67f9e04335 Only ever return an integer for job count 2016-03-15 11:52:19 -05:00
Ian Cordasco
6eb3dee1df Reorganize our Application flow 2016-03-15 08:42:30 -05:00
Ian Cordasco
189faf68ba Reorganize methods alphabetically
Add methods to report errors to the style guide

A single file works fine now but not a directory
2016-03-15 08:42:13 -05:00
Ian Cordasco
3b830366b6 Add a results queue 2016-03-15 08:40:43 -05:00
Ian Cordasco
07b9ffbeb9 Add naive multiprocessing support 2016-03-14 21:38:56 -05:00
Ian Cordasco
d222fcb9e1 Correct log levels around loading plugins 2016-03-14 21:38:08 -05:00
Ian Cordasco
0d3506b457 Log tokens at a lower level than debug 2016-03-14 21:37:50 -05:00
Ian Cordasco
e2314c38ed Add a lower level for extra verbosity 2016-03-14 21:37:32 -05:00
Ian Cordasco
447a6d4fcc Fix indentation causing incorrect logical lines 2016-03-14 20:23:20 -05:00
Ian Cordasco
daf5c4d80d Add ability to check if a file is ignored inline
Check for ``# flake8: noqa`` lines inside a file.
2016-03-14 20:23:03 -05:00
Ian Cordasco
2c17b4342f Better log format 2016-03-11 21:26:21 -06:00
Ian Cordasco
4c797c9ff7 Simplify how we check if a file is excluded
Our typical usage always passes is_path_excluded which checks the basename and the full path
2016-03-11 21:08:41 -06:00
Ian Cordasco
d331558868 Send logging output to --output-file 2016-03-11 21:07:40 -06:00
Ian Cordasco
960f4d6af7 Fix missing attributes for pep8 plugins 2016-03-10 19:54:53 -06:00
Ian Cordasco
f04d8da485 Add pep8 checks to plugins list 2016-03-10 19:41:19 -06:00
Ian Cordasco
da21821517 Make flake8 actually work 2016-03-10 19:00:07 -06:00
Ian Cordasco
36fb688f97 Refactor processor and file checker some more 2016-03-04 22:51:22 -06:00
Ian Cordasco
f7a8b7ade7 Move processor to its own module 2016-03-04 20:03:05 -06:00
Ian Cordasco
23c9091b1a Slowly working through pep8.Checker.check_logical 2016-03-02 23:28:24 -06:00
Ian Cordasco
0c894cc8bf Pull more logic out of pep8 2016-03-01 21:27:36 -06:00
Ian Cordasco
6ac955dfd4 Continue porting more logic from pep8 2016-02-28 00:55:47 -06:00
Ian Cordasco
074739de27 Accept the StyleGuide instead of options
pep8's checker has the noqa logic which we've correctly placed on the
StyleGuide object. By passing the StyleGuide in to our checkers we can
have the checkers pass the physical line to the StyleGuide so we can
eliminate our usage of linecache.
2016-02-27 00:06:19 -06:00
Ian Cordasco
12e71b0372 Incorporate more parsing logic from pycodestyle
Presently we're working on having two singly-responsible classes that
will be easy to test and ideally easier to reason about.
2016-02-26 23:16:33 -06:00
Ian Cordasco
b12f531da4 Separate the check runner from file processor
This separates concerns so that the check runner can rely on the file
processor to store state and such. It introduces two logical
collaborators and will allow us to keep feature parity with flake8 2's
plugin design (where it could request any attribute from pep8.Checker).
2016-02-26 08:52:20 -06:00
Ian Cordasco
6a15bd00b5 Store plugin parameters on the plugin itself
This allows us to access these from the checker module as well.
2016-02-26 08:21:09 -06:00
Ian Cordasco
62a78f4a97 Add note to tox.ini for others 2016-02-25 14:43:52 -06:00
Ian Cordasco
de9f56addf Fix import ordering in test files 2016-02-25 14:41:37 -06:00
Ian Cordasco
8d36355611 Re-order project imports based on flake8-import-order 2016-02-25 11:14:41 -06:00
Ian Cordasco
a4e984dbd2 Add and fix documentation
- Add more documentation around utils functions
- Fix documentation about default formatting plugins
- Add extra documentation of filenames_from predicate parameter
- Add test for the default parameter of flake8.utils.fnmatch
2016-02-25 09:06:50 -06:00
Ian Cordasco
62a7cca512 Remove python 3.2 from Travis
Remove special case for Python 2.6 mock test dependency
2016-02-24 16:41:38 -06:00
Ian Cordasco
cd18b9f175 Constrain our search for plugin type
Flake8 has previously only ever relied on the first member of the
parameters list to determine what kind of check it is using. As such,
we constrain ourselves to just that parameter when checking and add
properties for ast and logical line checks.
2016-02-23 23:25:12 -06:00
Ian Cordasco
24d2689a05 Distinguish check types via plugin type manager
Flake8 and pep8 has historically supported three types of checks:

- Plugins that accept the physical line
- Plugins that accept the logical line
- Plugins that accept the AST tree

The logical place to make this distinction is on the Checkers plugin
type manager class. This adds the foundation for finding plugins that
fall into each class.
2016-02-23 23:20:34 -06:00
Ian Cordasco
1cd5fea730 Add type annotations 2016-02-23 21:09:19 -06:00
Ian Cordasco
51d15295df Set the maximum complexity for mccabe 2016-02-23 17:08:54 -06:00
Ian Cordasco
08fd403e34 Add doc8 to linters 2016-02-23 14:42:50 -06:00
Ian Cordasco
54ad972e56 Add doc8 linting 2016-02-23 14:42:09 -06:00
Ian Cordasco
5ee061b810 Add line splitting and file reading
Add some tests around reading lines and striping UTF BOMs
2016-02-23 11:17:11 -06:00
Ian Cordasco
28f4811cb9 Read lines from the file in our checker 2016-02-22 22:17:37 -06:00
Ian Cordasco
7addb72615 Add unified linters testenv 2016-02-22 21:59:59 -06:00
Ian Cordasco
d5a480a464 Add method to determine if filename is excluded
Add a method to make FileCheckers from the list of arguments the user
passes. Start to work on FileCheckers
2016-02-22 21:51:50 -06:00