* file_piece.cc used isnan() instead of std::isnan().
* Fdstream.h used close() but Windows doesn't have unistd.h.
Fixed Fdstream.h by using util::scoped_fd. Thanks Ken.
This is lint reported by the new lint-checking functionality in beautify.py.
(We can change to a different lint checker if we have a better one, but it
would probably still flag these same problems.)
Lint checking can help a lot, but only if we get the lint under control.
The CSS style that Pocketlint expects is just too different from what we
have. Don't check those files for now.
Also, a maximum line length of 300 still gives too many warnings, so I'm
regretfully dumping the default to 400 characters. The traditional 80
characters are already longer than the measured optimum for human reading,
so I hope some day we can address this!
Choose which action(s) you want for each run: --format and/or --lint.
Many different types of files are lint-checkable, but you need Pocketlint
installed (plus ideally, its plugins for the various languages).
Also, added option to control batching of the commands.
This is about the last that isn't in contrib or generated files. At this
point we can start doing regular lint checks, at least on the Python files,
without being completely inundated with warnings.
I used mainly pocketlint, a very good Python linter, but also Syntastic,
a vim plugin. Didn't get anywhere near fixing all of Syntastic's complaints
though.
Once I've cleaned up all (or at least most) of the Python lint, we can
start doing regular automated lint checks and keep the code clean.
The path prefixes listed in .beautify-ignore, in the project root, will not
be cleaned up. C and C++ files everywhere else will be.
Also fixes bugs in the prefix-matching code, and makes the matching a little
bit more powerful: the prefix can now extend down into the directory tree.