[darcs-users] darcs patch: +custom hints file based on haskell_poli... (and 2 more)

Gwern Branwen gwern0 at gmail.com
Fri Aug 7 05:57:41 UTC 2009


On Thu, Aug 6, 2009 at 11:14 PM, Trent W. Buck<twb at cybersource.com.au> wrote:
> gwern0 at gmail.com writes:
>
>> Thu Aug  6 06:27:06 EDT 2009  gwern0 at gmail.com
>>   * +script to run hlint on src/
>
> Now that this work has been done (hooray!), some obligatory nitpicking.
>
> Why do the patch names start with a "+"?

WP convention; in this case, I am adding a file. adding = +

> Test script doesn't follow the example (tests/EXAMPLE.sh, IIRC).

What is there to follow? There's no need to call bash for a trivial executable invocation - I'm not even using conditionals or anything reasonably fancy.

> No license nor copyright declaration in .hint file.

I don't claim any copyright on the parts of the hint file original to me, and the warnings and comments are taken from haskell_policy.sh, which has no license or copyright declaration either.

> What happens if the user has no hlint installed?

The script will bomb out.

> What happens if the user has too old an hlint installed?

Then I think it'll error out when it can't parse the hints like Data.ByteString.Char8.* (see my earlier email about errors with the correct hints). 

> Do the docs tell testers to install hlint ≥ <version>?

No; what docs would I edit? I grepped in docs/ and tests/ for 'haskell_policy' and found nothing.

>>   we don't edit haskell_policy.sh directly because if there's a single
>>   warning or error it errors out and hlint generates >1k items
>
> I'm not sure what you mean by this.  How about redirecting hlint's
> output to a file?  This way the output within the test harness is
> minimal, but users can see the exact error by consulting the report file.
>
>  hlint --hint=darcs-custom.hint ../src --report hlint.html >/dev/null ||
>  {
>    echo >&2 "Errors found by hlint!  See $(dirname "$0")/hlint.html for details."
>    exit 1
>  }

All the warnings & errors should be fixed, or we ought to discuss why a class of warnings & errors is unreliable and ought to be disabled. Hiding them up is not a good idea, I don' think.

> Incidentally, looking only at ../src/ causes Setup.lhs and
> Distribution/*.lhs to be skipped.  Any reason just ../ wouldn't work?

No. Should those files be looked at?

-- 
gwern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osuosl.org/pipermail/darcs-users/attachments/20090807/383f1767/attachment.pgp>


More information about the darcs-users mailing list