many changes, primarily dealing with options and tests #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's my day and a half on it.
Many changes today.
First, the caveats. I've done nothing about vim support. Nothing at
all.
Also, there are a few new library requirements, but they're all in the
standard python library, although argparse now forces us to drop support
for python-2.6 and python-3.1, both of which lacked argparse.
Primarily, I was interested in better testing. To make that happen, I
had to rationalize the parameters that came from config file and
command line. I did that by inventing class ParamBlock.
Linelimit is now a configfile option.
I revamped the "unicode" option. It's now "symbol-style" and allows
you to either force the copyright symbol to be an arbitrary string,
(presumably "(C)", "(c)", or "©"), remove it entirely using "", or
leave it unchanged, (if unset).
I dropped the email field. It's trivial to add as part of the name
and I couldn't see any value to carrying it separately from the name.
The year to use in the copyright rewrite is now also a possible
option.
I've added an option for warning about files for which no suitable
copyright line can be found.
I've completely revamped the configfile. Options are now all in the
same 'copyrightupdate' section and look like this:
[copyrightupdate]
linelimit = 6
name = Joe Blow [email protected]
symbol_style = "(C)"
year = 1999
warn = yes
And there are a slew of new tests covering most of these cases.
Among the bugs squashed:
performance optimization from several angles. First, no time is
spent writing an unchanged file. And second, things like indexers,
source code control, editors, etc, which key off the last modification
time of the file are only alerted when a file actually changes.
adds a feature to the suite.