Commit graph

21 commits

Author SHA1 Message Date
Ian Stapleton Cordasco
56b86ba9fe
Fix up test files for W504 2018-10-20 12:37:32 -05:00
Anthony Sottile
fdcee0259d Fix failing encoding test on appveyor 2017-10-19 08:33:55 -07:00
Anthony Sottile
bbe8d6d6c6 Catch UnicodeDecodeError while parsing config files 2017-10-09 09:52:37 -07:00
Carl Meyer
4e58068657 Add support for local (in-repo, non-setuptools) plugins.
Closes #357
2017-08-03 00:25:37 -07:00
Ian Cordasco
df2fa18a08
Fix project config file discovery
Flake8 3.0 was stopping once it found the current directory but the
historical behaviour (that we didn't intend to break) searched past
that (towards root) until it found one of the project/local config
file names that could be read.

Closes #181
2016-07-26 09:37:32 -05:00
Ian Cordasco
75e1c1efbf
Revert "Prefer .flake8 if present for options."
The intended behaviour already existed.

This reverts commit db9d4ad8b4.
2016-06-28 20:47:16 -05:00
Tom Prince
db9d4ad8b4 Prefer .flake8 if present for options.
If somebody explicitly has a `.flake8` file, presumably they intend to
put flake8 configuration in it, so prefer it to the generic `setup.cfg`
and `tox.ini` from pycodestyle.
2016-06-25 14:22:21 -06:00
Ian Cordasco
8bc76f79de
Configure flake8-import-order to use Google Style
This relies on two things:

1. Properly configuring flake8-import-order to use that style
2. Properly configuring flake8-import-order to know that flake8 is our
   application name.
2016-06-17 10:26:36 -05:00
Ian Cordasco
3f434f7d1c
Add broken config file to test error handling
ConfigFileFinder should absolutely handle broken/invalid config files
by refusing to try to parse them. Here we catch the ParsingError,
log the exception, and then return normally. The RawConfigParser
instance is perfectly valid still and will behave as if nothing had
been read and we just need to indicate that we didn't find any files
worthy of reading.

Related to: https://github.com/PyCQA/pycodestyle/issues/506
2016-06-16 16:19:09 -05:00
Ian Cordasco
33f982b446 Rely on Python 3.4 backport of configparser
Python 2.7's ConfigParser module does not allow for the behaviour we
have documented for config files in Flake8 3.0. To compensate for that,
we add a dependency on the configparser backport on PyPI for Python 2.7
2016-05-30 12:51:31 -05:00
Ian Cordasco
de9f56addf Fix import ordering in test files 2016-02-25 14:41:37 -06:00
Ian Cordasco
69b8be71dc Make pylint happier 2016-02-19 15:10:46 -06:00
Ian Cordasco
8b85e93e21 Add test for local_configs method 2016-01-10 12:52:29 -06:00
Ian Cordasco
de96b24bad Add parameter for missing extra config file 2016-01-10 09:50:32 -06:00
Ian Cordasco
7269d84845 Add test parameters with extra_config_files 2016-01-10 09:45:43 -06:00
Ian Cordasco
b8dfc9a8e2 Start testing ConfigFileFinder.local_config_files
Make sure extra_config_files are all absolute paths and filter them
in local_config_files to ensure they exist.
2016-01-10 09:39:37 -06:00
Ian Cordasco
204a367095 Add more parameters to file location generation test 2016-01-10 09:05:09 -06:00
Ian Cordasco
cb276d63e3 Parametrize windows detection unit test 2016-01-10 09:04:39 -06:00
Ian Cordasco
949d3e48fe Add tests for generate_possible_local_config_files
Fix a bug found via testing where we traverse all the way to the root
directory looking for config files.
2016-01-10 08:40:35 -06:00
Ian Cordasco
dd46f02b58 Add config file fixtures
Add more ConfigFileFinder tests
2016-01-09 23:02:20 -06:00
Ian Cordasco
8dd160c98e Start writing tests for the config finder 2016-01-09 22:34:39 -06:00