Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't error out on compressed files or on non-Unicode files #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Aug 23, 2015

  1. Configuration menu
    Copy the full SHA
    b465ef6 View commit details
    Browse the repository at this point in the history
  2. Handle Unicode decoding errors while reading files

    In Python 3, opening a file in text mode and reading it may throw
    UnicodeDecodeErrors.  This adds handling for this and reports any such
    errors as `unicode_decode_error` messages in Dodgy's results.
    
    This means that running Dodgy under Python 3 will be pickier than
    running it under Python 2, since Python 2 doesn't really care about
    encodings.  This probably isn't ideal, but it at least keeps Dodgy from
    crashing on an entire project tree if one file has a bad encoding has
    its file type mis-detected.
    joshkel committed Aug 23, 2015
    Configuration menu
    Copy the full SHA
    f8f9436 View commit details
    Browse the repository at this point in the history
  3. Skip compressed files

    This prevents spurious UnicodeDecodeErrors in Python 3.
    
    Adding handling for compressed files would not be hard (using gzip, bz2,
    and optionally lzma libraries), but there's probably little benefit,
    since compressed files in a project tree are likely either from an
    upstream source or have an uncompressed version available for testing.
    joshkel committed Aug 23, 2015
    Configuration menu
    Copy the full SHA
    6282992 View commit details
    Browse the repository at this point in the history