Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 2714 - lintool reports the string literal "use" as an error when it's part of a message
Summary: lintool reports the string literal "use" as an error when it's part of a message
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: Low minor (vote)
Assignee: Karl Trygve Kalleberg (RETIRED)
Depends on:
Reported: 2002-05-13 22:11 UTC by Sandy McArthur
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sandy McArthur 2002-05-13 22:11:51 UTC
I first noticed this on the dev-lang/icc-6.0.ebuild . If you run `lintool
icc-6.0.ebuild` it complains about 1 USE error. If you edit the ebuild and
change the one occurent of "use" to something else the error goes away.

I'll admit it's diffcult to dectect if "use" it a command or a string literal
and here is the best/eaiest case I can think of off the top of my head.

When a use is found, take the substring before the "use", remove any esacped
quotes (\").
If there is an even number of quotes then it is a command.
If there is an odd number you need to count the number of back ticks "`".
If there is an odd number of back ticks "`" then it is a comand.

You should probably account for single quotes but I think that will complicate
the code a lot more.

This won't prevent all false errors but it's easier than writing a shell
interpeter which would be needed to do it right.
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2002-05-14 18:32:23 UTC
Fixed for now. Not all false positives have been removed. I suggest we simply
rewrite the sentences slightly for the rest ;P