Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1503] KitchenSink Errors

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-04-28T20:50:41.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelserrors, jslint, kitchensink
Reporterjbrinkman
AssigneeIngo Muschenetz
Created2011-04-15T02:54:33.000+0000
Updated2017-05-02T21:12:14.000+0000

Description

When I open KitchenSink application in Eclipse (JavaScript edition) it shows 151 errors and 427 warnings. As the baseline sample app, this seems like it should be fairly clean as it could add subtle errors to users code as they use elements of this code as a starting point. Also, I have found a number of files in the kitchensink application which are no longer used.

Attachments

FileDateSize
kitchensink.diff2011-04-15T02:54:34.000+0000133929

Comments

  1. Matt Bishop 2011-04-15

    I have created a patch to reduce the number of warnings down to three, a more reasonable number. I agree, having a kitchensink app with so many warnings is not very confidence-inspiring.

  2. Rich Baughman 2011-04-15

    How do we apply this patch to KS project files on Mac OS X/Titanium?

  3. Matt Bishop 2011-04-15

    This is assuming you have cloned the git project.

    1. Put the kitchensink.diff file in KitchenSink/KitchenSink
    2. git-apply --check kitchensink.diff

    If that says the patch is OK then apply it:
    3. git-apply kitchensink.diff

    NOTE: I created a new, separate project called PatchedKitchenSink and copied the patched KitchenSink/Resources dir into it, overwriting the base Resources dir that Titanium created. The files around the checked-out version (like what is in build/) are not well.

  4. Matt Bishop 2011-04-15

    Step 1 should read:

    1. Put the kitchensink.diff file in KitchenSink/

    Sorry about that.

  5. k00k 2011-04-15

    I get the following errors. Can you just put a zip of the updated files up somewhere?

       $ git apply kitchensink.diff 
       kitchensink.diff:821: trailing whitespace.
       testRow("integer", "123", function(obj) { return obj==123; });
       kitchensink.diff:822: trailing whitespace.
       testRow("double", "123.456", function(obj) { return obj == 123.456; });
       kitchensink.diff:1766: space before tab in indent.
               Titanium.API.info('search bar: focus received');
       kitchensink.diff:1771: space before tab in indent.
               Titanium.API.info('search bar:blur received');
       kitchensink.diff:1856: space before tab in indent.
               {
       error: patch failed: KitchenSink/build/iphone/Resources/.version:1
       error: KitchenSink/build/iphone/Resources/.version: patch does not apply
       error: patch failed: KitchenSink/build/iphone/project.xcconfig:1
       error: KitchenSink/build/iphone/project.xcconfig: patch does not apply
       
  6. k00k 2011-04-15

    And just to be verbose, here's what happens with a --check:

       
       $ git apply --check kitchensink.diff 
       error: patch failed: KitchenSink/build/iphone/Resources/.version:1
       error: KitchenSink/build/iphone/Resources/.version: patch does not apply
       error: patch failed: KitchenSink/build/iphone/project.xcconfig:1
       error: KitchenSink/build/iphone/project.xcconfig: patch does not apply
       
  7. Matt Bishop 2011-04-15

    It may be that the current version is newer than what is in the patch.

  8. Stephen Tramer 2011-04-15

    Do we even care about this? Going to put in Ralf's bucket.

  9. Rich Baughman 2011-04-15

    I would like to request that, as the primary coding model and de facto Ti reference and teaching piece for all current and aspiring Titanium developers, Appcelerator should make it a priority item for improving the quality of the code and its embedded documentation. There is really no excuse for providing a reference app that generates hundreds of errors and warnings, since they can be avoided. Many of the examples need to be more robust, and the code quality is less than optimal, to say the least. There's little use of user-defined classes, the examples are in some cases overly trivial and unhelpful, there's a lot of redundant code with hardwired coordinates, etc. I would think that Appcelerator would want this to be a "best foot forward" advertisement for the platform, using coding best practices. It's been 6 months since this was raised, and I'm still getting 155 warnings from KS in 1.6.0.

  10. Sindre Sorhus 2011-04-15

    I couldn't agree more. KitchenSink is a mess, both in structure and coding style.

    It is important. Every new user use KitchenSink as a reference. So you're essentially promoting bad coding style.

  11. Thomas Huelbert 2012-01-12

    reassigning
  12. Lee Morris 2017-04-28

    Closing ticket as invalid as this version of Kitchen Sink is no longer in use.

JSON Source