[haiku-bugs] Re: [Haiku] #12710: BPackageInfo; URL Validation Checks

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Wed, 13 Apr 2016 11:24:26 -0000

#12710: BPackageInfo; URL Validation Checks
--------------------------------+----------------------------
   Reporter:  apl-haiku         |      Owner:  bonefish
       Type:  enhancement       |     Status:  new
   Priority:  normal            |  Milestone:  Unscheduled
  Component:  Kits/Package Kit  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------

Comment (by axeld):

 Looks mostly good, but you add some minor coding style issues:
 * No one ever seems to delete the UrlStringValidator (C++ doesn't have
 garbage collection).
 * PackageInfoParser.cpp, line 548: We don't use parenthesis around single
 line statements.
 * Line 928 seems to add some stray white space, line 932 might as well.
 * Line 1163ff.: all operators besides ',' always go to the next line, ie.:
 {{{
 return url.StartsWith("http://";)
         || url.StartsWith("https://";)
         || url.StartsWith("ftp://";)
         || url.StartsWith("file:/");
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/12710#comment:1>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: