bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: symbolic links, unreadable files, skip


From: Shigio YAMAGUCHI
Subject: Re: symbolic links, unreadable files, skip
Date: Sat, 29 Aug 2015 08:18:57 +0900

OK. I accept your suggestion.

Is --skip-unreadable OK for the option name?
Please tell me if you have better candidates.

If the --skip-unreadable option is specified, gtags does readable check
of source files before passing them to the parsers. The check is done using
access(path, R_OK).

If a file is unreadable, then gtags ignores it.
Ignoring means the followings:

(1) Print warning message.
(2) The file is not added to GPATH.
(3) The file is not passed to the parser.

Parsers are as before. Procedure die() and warning() are granted to
plug-in parsers. So, gtags cannot force them to continue the jobs.
But they will not stop their job because of permission error, because
such files are not passed.

What do you think?

Regards
Shigio


2015-08-28 16:14 GMT+09:00 Marcus Harnisch <address@hidden>:
On Fri, Aug 28, 2015 at 4:22 AM, Jason Hood <address@hidden> wrote:
On 28/08/2015 10:26, Shigio YAMAGUCHI wrote:
> Unlike that, an unreadable file means that something critical has
> occurred. In that case, gtags stop its job, and give the user a chance
> to check the disk, permission and etc.

Fair enough. That's why I am not asking to make this the default behavior, but either a config value or a command line option, which demotes the error&die to a warning.

(and something's gone wrong with skip, although it sounds like
that's impractical in this case, anyway)

It is impractical indeed. The skip rules would be huge and tedious to create in a trial and error approach.
In case of symbolic links, skip seems to look at the name of the link only, not at the name of the link target. In my scenario, if only one directory tree is unreadable, but is pointed to by a large number of links, I'd have to create skip rules for all these links.

Cheers
Marcus




--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]