{ "id": "92782", "key": "TIMOB-9368", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2016-08-24T20:12:36.000+0000", "created": "2012-06-04T12:32:19.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [ { "id": "17889", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "outwardIssue": { "id": "91660", "key": "TIMOB-9075", "fields": { "summary": "CodeProcessor: Implement the Code Processor API", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-03-20T17:24:15.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "13102", "name": "Code Processor", "description": "Analyzes JavaScript source" } ], "description": "It is easy to accidentally create global variables that can have difficult to diagnose consequences. For example:\r\n\r\nvar x,\r\n y;\r\n z;\r\n\r\ncreates a global variable 'z'. This plugin should throw a warning whenever a global variable is created without referencing the global object. In other words, this is a best practice enforcer plugin.", "attachment": [], "flagged": false, "summary": "Code Processor: Implement Accidental Global Variable Declaration Code Processor plugin. ", "creator": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "197201", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I use strict mode.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-06-04T23:20:06.000+0000", "updated": "2012-06-04T23:20:06.000+0000" }, { "id": "197206", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Not all browsers support strict mode (I'm looking at you IE), and most devs don't use strict mode (unfortunately).", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T00:00:07.000+0000", "updated": "2012-06-05T00:00:07.000+0000" }, { "id": "197449", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Yeah, I agree, not all browsers support it. But, IMO, it is valuable development tool no matter that fact (if global variables aren't created in browser that does support strict mode by using strict mode, they won't be accidentally created in the browser that does not support strict mode :) ).\r\n\r\n\r\nIn my opinion, documenting usage of strict mode could be useful because it can be used right away (v8 and JSC supports it, so it can be used on Android and iOS also).", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-06-06T00:22:51.000+0000", "updated": "2012-06-06T00:22:51.000+0000" }, { "id": "197515", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm definitely not arguing against the use of strict mode...in fact I strongly encourage it. I just think there is room to do a lot more. I feel that whatever we have should a) be caught at compile time not run time, b) be opt-out, and c) always available regardless of runtime.\r\n\r\nThe problem with relying on run-time tools is that the code must be run in order to see the error. If this error is in some seldom used corner case (think unexpected error handling), the error may not be caught for months and will be noticed by some user, not the developer. Moving this error handling to compile time is so much cleaner.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-06T09:52:40.000+0000", "updated": "2012-06-06T09:52:40.000+0000" }, { "id": "197824", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I doubt that you will be able to catch all errors at compile time due to dynamic nature of the language (no offense meant, just reason talking). :)\r\n\r\n\r\nGlobal variable declaration is just one trivial case. \"this\" and its potential to create global variables is much more challenging (note that \"this\" value can be different every time and its value is determined at call-time).\r\n\r\n\r\nThere are more cases that are very challenging to cover with static analysis.\r\n\r\n\r\n\r\nBecause of that, my opinion is that it is better to use existing tools (strict mode, JSLint, JSHint, whatever ... and maybe modify them if they don't fit perfectly to Titanium), than to develop own tools, which can be, very challenging task. I would prefer official testing tools instead. :)", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-06-08T00:25:33.000+0000", "updated": "2012-06-08T00:25:33.000+0000" }, { "id": "197857", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fortunately for us, I'm not doing static analysis :) I'm doing a partial dynamic analysis, so knowing what the this pointer is won't be a problem.\r\n\r\nWRT \"Because of that, my opinion is that it is better to use existing tools (strict mode, JSLint, JSHint, whatever ... and maybe modify them if they don't fit perfectly to Titanium), than to develop own tools, which can be, very challenging task. I would prefer official testing tools instead.\" We have already done a careful analysis of these options and rejected them for various reason. Work has already begun on these tools, and have been scheduled into development. The tools will be optional, so if you don't want to use them, then by all means use JSLint or whatever you prefer instead.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-08T09:49:45.000+0000", "updated": "2012-06-08T09:49:45.000+0000" }, { "id": "197947", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "OK, thanks. :)", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-06-09T00:42:36.000+0000", "updated": "2012-06-09T00:42:36.000+0000" }, { "id": "394267", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Code processor is dead.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2016-08-24T20:12:36.000+0000", "updated": "2016-08-24T20:12:36.000+0000" }, { "id": "413750", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as code processor is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-20T17:24:15.000+0000", "updated": "2017-03-20T17:24:15.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }