def get_files_to_check(self):
        """Generate files and error codes to check on each one.

        Walk dir trees under `self._arguments` and yield file names
        that `match` under each directory that `match_dir`.
        The method locates the configuration for each file name and yields a
        tuple of (filename, [error_codes]).

        With every discovery of a new configuration file `IllegalConfiguration`
        might be raised.

        """
        def _get_matches(conf):
            """Return the `match` and `match_dir` functions for `config`."""
            match_func = re(conf.match + '$').match
            match_dir_func = re(conf.match_dir + '$').match
            return match_func, match_dir_func

        def _get_ignore_decorators(conf):
            """Return the `ignore_decorators` as None or regex."""
            return (re(conf.ignore_decorators) if conf.ignore_decorators
                    else None)

        for name in self._arguments:
            if os.path.isdir(name):
                for root, dirs, filenames in os.walk(name):
                    config = self._get_config(os.path.abspath(root))
                    match, match_dir = _get_matches(config)
                    ignore_decorators = _get_ignore_decorators(config)

                    # Skip any dirs that do not match match_dir
                    dirs[:] = [d for d in dirs if match_dir(d)]

                    for filename in filenames:
                        if match(filename):
                            full_path = os.path.join(root, filename)
                            yield (full_path, list(config.checked_codes),
                                   ignore_decorators)
            else:
                config = self._get_config(os.path.abspath(name))
                match, _ = _get_matches(config)
                ignore_decorators = _get_ignore_decorators(config)
                if match(name):
                    yield (name, list(config.checked_codes), ignore_decorators)
Generate files and error codes to check on each one.

        Walk dir trees under `self._arguments` and yield file names
        that `match` under each directory that `match_dir`.
        The method locates the configuration for each file name and yields a
        tuple of (filename, [error_codes]).

        With every discovery of a new configuration file `IllegalConfiguration`
        might be raised.