Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to parse the output of hg blame on big js file #7

Open
arthurzenika opened this issue Jun 6, 2018 · 1 comment
Open

Failing to parse the output of hg blame on big js file #7

arthurzenika opened this issue Jun 6, 2018 · 1 comment

Comments

@arthurzenika
Copy link

It seems that sonar-scm-mercurial is failing to parse the output of a big minified js file.

ERROR: Error during SonarQube Scanner execution
ERROR: Error inside stdOut stream [command: hg blame -w -v --user --date --changeset project/data/Cesium/Build/Cesium/Cesium.js]
ERROR: Caused by: Unable to blame file project/data/Cesium/Build/Cesium/Cesium.js. Unrecognized blame info at line 471: User <email> 1956377ad712 Fri Apr 13 10:56:49 2018 +0200: if(void 0!==e.styleAttribute){if(!Array.isArray(e.styleAttribute))return"styleAttribute: array expected";for(var i=0;i<e.styleAttribute.length;++i){var t=a[6].verify(e.styleAttribute[i]);if(t)return"styleAttribute."+t}}if(void 0!==e.styleMap){if(!Array.isArray(e.styleMap))return"styleMap: array expected";for(var i=0;i<e.styleMap.length;++i){var t=a[7].verify(e.styleMap[i]);if(t)return"styleMap."+t}}if(void 0!==e.endSnippet&&null!==e.endSnippet){var t=a[8].verify(e.endSnippet);if(t)return"endSnippet."+t}if(void 0!==e.translationEntry){if(!Array.isArray(e.translationEntry))return"translationEntry: array expected";for(var i=0;i<e.translationEntry.length;++i){var t=a[9].verify(e.translationEntry[i]);if(t)return"translationEntry."+t}}if(void 0!==e.language&&!r.isString(e.language))return"language: string expected";if(void 0!==e.version&&!r.isInteger(e.version))return"version: integer expected";if(void 0!==e.dbrootReference){if(!Array.isArray(e.dbrootReference))return"dbrootReference: array expected";for(var i=0;i<e.dbrootReference.length;++i){var t=a[12].verify(e.dbrootReference[i]);if(t)return"dbrootReference."+t}}if(void 0!==e.databaseVersion&&null!==e.databaseVersion){var t=a[13].verify(e.databaseVersion);if(t)return"databaseVersion."+t}return void 0===e.refreshTimeout||r.isInteger(e.refreshTimeout)?null:"refreshTimeout: integer expected"},o.fromObject=function(e){if(e instanceof n.keyhole.dbroot.DbRootProto)return e;var t=new n.keyhole.dbroot.DbRootProto;if(void 0!==e.databaseName&&null!==e.databaseName){if("object"!=typeof e.databaseName)throw TypeError(".keyhole.dbroot.DbRootProto.databaseName: object expected");t.databaseName=a[0].fromObject(e.databaseName)}if(void 0!==e.imageryPresent&&null!==e.imageryPresent&&(t.imageryPresent=Boolean(e.imageryPresent)),void 0!==e.protoImagery&&null!==e.protoImagery&&(t.protoImagery=Boolean(e.protoImagery)),void 0!==e.terrainPresent&&null!==e.terrainPresent&&(t.terrainPresent=Boolean(e.terrainPresent)),e.providerInfo){if(!Array.isArray(e.providerInfo))throw TypeError(".keyhole.dbroot.DbRootProto.providerInfo: array expected");t.providerInfo=[];for(var r=0;r<e.providerInfo.length;++r){if("object"!=typeof e.providerInfo[r])throw TypeError(".keyhole.dbroot.DbRootProto.providerInfo: object expected");t.providerInfo[r]=a[4].fromObject(e.providerInfo[r])}}if(e.nestedFeature){if(!Array.isArray(e.nestedFeature))throw TypeError(".keyhole.dbroot.DbRootProto.nestedFeature: array expected");t.nestedFeature=[];for(var r=0;r<e.nestedFeature.length;++r){if("object"!=typeof e.nestedFeature[r])throw TypeError(".keyhole.dbroot.DbRootProto.nestedFeature: object expected");t.nestedFeature[r]=a[5].fromObject(e.nestedFeature[r])}}if(e.styleAttribute){if(!Array.isArray(e.styleAttribute))throw TypeError(".keyhole.dbroot.DbRootProto.styleAttribute: array expected");t.styleAttribute=[];for(var r=0;r<e.styleAttribute.length;++r){if("object"!=typeof e.styleAttribute[r])throw TypeError(".keyhole.dbroot.DbRootProto.styleAttribute: object expected");t.styleAttribute[r]=a[6].fromObject(e.styleAttribute[r])}}if(e.styleMap){if(!Array.isArray(e.styleMap))throw TypeError(".keyhole.dbroot.DbRootProto.styleMap: array expected");t.styleMap=[];for(var r=0;r<e.styleMap.length;++r){if("object"!=typeof e.styleMap[r])throw TypeError(".keyhole.dbroot.DbRootProto.styleMap: object expected");t.styleMap[r]=a[7].fromObject(e.styleMap[r])}}if(void 0!==e.endSnippet&&null!==e.endSnippet){if("object"!=typeof e.endSnippet)throw TypeError(".keyhole.dbroot.DbRootProto.endSnippet: object expected");t.endSnippet=a[8].fromObject(e.endSnippet)}if(e.translationEntry){if(!Array.isArray(e.translationEntry))throw TypeError(".keyhole.dbroot.DbRootProto.translationEntry: array expected");t.translationEntry=[];for(var r=0;r<e.translationEntry.length;++r){if("object"!=typeof e.translationEntry[r])throw TypeError(".keyhole.dbroot.DbRootProto.translationEntry: object expected");t.translationEntry[r]=a[9].fromObject(e.translationEntry[r])}}if(void 0!==e.language&&null!==e.language&&(t.language=String(e.language)),void 0!==e.version&&null!==e.version&&(t.version=0|e.version),e.dbrootReference){if(!Array.isArray(e.dbrootReference))throw TypeError(".keyhole.dbroot.DbRootProto.dbrootReference: array expected");t.dbrootReference=[];for(var r=0;r<e.dbrootReference.length;++r){if("object"!=typeof e.dbrootReference[r])throw TypeError(".keyhole.dbroot.DbRootProto.dbrootReference: object expected");t.dbrootReference[r]=a[12].fromObject(e.dbrootReference[r])}}if(void 0!==e.databaseVersion&&null!==e.databaseVersion){if("object"!=typeof e.databaseVersion)throw TypeError(".keyhole.dbroot.DbRootProto.databaseVersion: object expected");t.databaseVersion=a[13].fromObject(e.databaseVersion)}return void 0!==e.refreshTimeout&&null!==e.refreshTimeout&&(t.refreshTimeout=0|e.refreshTimeout),t},o.from=o.fromObject,o.toObject=function(e,t){t||(t={});var r={};if((t.arrays||t.defaults)&&(r.providerInfo=[],r.nestedFeature=[],r.styleAttribute=[],r.styleMap=[],r.translationEntry=[],r.dbrootReference=[]),t.defaults&&(r.databaseName=null,r.imageryPresent=!0,r.protoImagery=!1,r.terrainPresent=!1,r.endSnippet=null,r.language="en",r.version=5,r.databaseVersion=null,r.refreshTimeout=0),void 0!==e.databaseName&&null!==e.databaseName&&e.hasOwnProperty("databaseName")&&(r.databaseName=a[0].toObject(e.databaseName,t)),void 0!==e.imageryPresent&&null!==e.imageryPresent&&e.hasOwnProperty("imageryPresent")&&(r.imageryPresent=e.imageryPresent),void 0!==e.protoImagery&&null!==e.protoImagery&&e.hasOwnProperty("protoImagery")&&(r.protoImagery=e.protoImagery),void 0!==e.terrainPresent&&null!==e.terrainPresent&&e.hasOwnProperty("terrainPresent")&&(r.terrainPresent=e.terrainPresent),void 0!==e.providerInfo&&null!==e.providerInfo&&e.hasOwnProperty("providerInfo")){r.providerInfo=[];for(var i=0;i<e.providerInfo.length;++i)r.providerInfo[i]=a[4].toObject(e.providerInfo[i],t)}if(void 0!==e.nestedFeature&&null!==e.nestedFeature&&e.hasOwnProperty("nestedFeature")){r.nestedFeature=[];for(var i=0;i<e.nestedFeature.length;++i)r.nestedFeature[i]=a[5].toObject(e.nestedFeature[i],t)}if(void 0!==e.styleAttribute&&null!==e.styleAttribute&&e.hasOwnProperty("styleAttribute")){r.styleAttribute=[];for(var i=0;i<e.styleAttribute.length;++i)r.styleAttribute[i]=a[6].toObject(e.styleAttribute[i],t)}if(void 0!==e.styleMap&&null!==e.styleMap&&e.hasOwnProperty("styleMap")){r.styleMap=[];for(var i=0;i<e.styleMap.length;++i)r.styleMap[i]=a[7].toObject(e.styleMap[i],t)}if(void 0!==e.endSnippet&&null!==e.endSnippet&&e.hasOwnProperty("endSnippet")&&(r.endSnippet=a[8].toObject(e.endSnippet,t)),void 0!==e.translationEntry&&null!==e.translationEntry&&e.hasOwnProperty("translationEntry")){r.translationEntry=[];for(var i=0;i<e.translationEntry.length;++i)r.translationEntry[i]=a[9].toObject(e.translationEntry[i],t)}if(void 0!==e.language&&null!==e.language&&e.hasOwnProperty("language")&&(r.language=e.language),void 0!==e.version&&null!==e.version&&e.hasOwnProperty("version")&&(r.version=e.version),void 0!==e.dbrootReference&&null!==e.dbrootReference&&e.hasOwnProperty("dbrootReference")){r.dbrootReference=[];for(var i=0;i<e.dbrootReference.length;++i)r.dbrootReference[i]=a[12].toObject(e.dbrootReference[i],t)}return void 0!==e.databaseVersion&&null!==e.databaseVersion&&e.hasOwnProperty("databaseVersion")&&(r.databaseVersion=a[13].toObject(e.databaseVersion,t)),void 0!==e.refreshTimeout&&null!==e.refreshTimeout&&e.hasOwnProperty("refreshTimeout")&&(r.refreshTimeout=e.refreshTimeout),r},o.prototype.toObject=function(e){return this.constructor.toObject(this,e)},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o}(),o.EncryptedDbRootProto=function(){function o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}o.prototype.encryptionType=0,o.prototype.encryptionData=r.newBuffer([]),o.prototype.dbrootData=r.newBuffer([]);var a={0:"keyhole.dbroot.EncryptedDbRootProto.EncryptionType"};return i.push(a),o.decode=function(e,r){e instanceof t||(e=t.create(e));for(var i=void 0===r?e.len:e.pos+r,o=new n.keyhole.dbroot.EncryptedDbRootProto;e.pos<i;){var a=e.uint32();switch(a>>>3){case 1:o.encryptionType=e.uint32();break;case 2:o.encryptionData=e.bytes();break;case 3:o.dbrootData=e.bytes();break;default:e.skipType(7&a)}}return o},o.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(void 0!==e.encryptionType)switch(e.encryptionType){default:return"encryptionType: enum value expected";case 0:}return void 0===e.encryptionData||e.encryptionData&&"number"==typeof e.encryptionData.length||r.isString(e.encryptionData)?void 0===e.dbrootData||e.dbrootData&&"number"==typeof e.dbrootData.length||r.isString(e.dbrootData)?null:"dbrootData: buffer expected":"encryptionData: buffer expected"},o.fromObject=function(e){if(e instanceof n.keyhole.dbroot.EncryptedDbRootProto)return e;var t=new n.keyhole.dbroot.EncryptedDbRootProto;switch(e.encryptionType){case"ENCRYPTION_XOR":case 0:t.encryptionType=0}return void 0!==e.encryptionData&&null!==e.encryptionData&&("string"==typeof e.encryptionData?r.base64.decode(e.encryptionData,t.encryptionData=r.newBuffer(r.base64.length(e.encryptionData)),0):e.encryptionData.length&&(t.encryptionData=e.encryptionData)),void 0!==e.dbrootData&&null!==e.dbrootData&&("string"==typeof e.dbrootData?r.base64.decode(e.dbrootData,t.dbrootData=r.newBuffer(r.base64.length(e.dbrootData)),0):e.dbrootData.length&&(t.dbrootData=e.dbrootData)),t},o.from=o.fromObject,o.toObject=function(e,t){t||(t={});var i={};return t.defaults&&(i.encryptionType=t.enums===String?"ENCRYPTION_XOR":0,i.encryptionData=t.bytes===String?"":[],i.dbrootData=t.bytes===String?"":[]),void 0!==e.encryptionType&&null!==e.encryptionType&&e.hasOwnProperty("encryptionType")&&(i.encryptionType=t.enums===String?a[0][e.encryptionType]:e.encryptionType),void 0!==e.encryptionData&&null!==e.encryptionData&&e.hasOwnProperty("encryptionData")&&(i.encryptionData=t.bytes===String?r.base64.encode(e.encryptionData,0,e.encryptionData.length):t.bytes===Array?Array.prototype.slice.call(e.encryptionData):e.encryptionData),void 0!==e.dbrootData&&null!==e.dbrootData&&e.hasOwnProperty("dbrootData")&&(i.dbrootData=t.bytes===String?r.base64.encode(e.dbrootData,0,e.dbrootData.length):t.bytes===Array?Array.prototype.slice.call(e.dbrootData):e.dbrootData),i},o.prototype.toObject=function(e){return this.constructor.toObject(this,e)},o.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},o.EncryptionType=function(){var e={},t=Object.create(e);return t.ENCRYPTION_XOR=0,t}(),o}(),o}(),o}(),r.lazyResolve(n,i),n.keyhole.dbroot}),define("Core/isBitSet",[],function(){"use strict";function e(e,t){return 0!=(e&t)}return e}),define("Core/GoogleEarthEnterpriseTileInformation",["./defined","./isBitSet"],function(e,t){"use strict";function r(e,t,r,i,n,o){this._bits=e,this.cnodeVersion=t,this.imageryVersion=r,this.terrainVersion=i,this.imageryProvider=n,this.terrainProvider=o,this.ancestorHasTerrain=!1,this.terrainState=void 0}var i=[1,2,4,8];return r.clone=function(t,i){return e(i)?(i._bits=t._bits,i.cnodeVersion=t.cnodeVersion,i.imageryVersion=t.imageryVersion,i.terrainVersion=t.terrainVersion,i.imageryProvider=t.imageryProvider,i.terrainProvider=t.terrainProvider):i=new r(t._bits,t.cnodeVersion,t.imageryVersion,t.terrainVersion,t.imageryProvider,t.terrainProvider),i.ancestorHasTerrain=t.ancestorHasTerrain,i.terrainState=t.terrainState,i},r.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},r.prototype.hasSubtree=function(){return t(this._bits,16)},r.prototype.hasImagery=function(){return t(this._bits,64)},r.prototype.hasTerrain=function(){return t(this._bits,128)},r.prototype.hasChildren=function(){return t(this._bits,15)},r.prototype.hasChild=function(e){return t(this._bits,i[e])},r.prototype.getChildBitmask=function(){return 15&this._bits},r}),define("Core/GoogleEarthEnterpriseMetadata",["../ThirdParty/google-earth-dbroot-parser","../ThirdParty/when","./appendForwardSlash","./Check","./Credit","./defaultValue","./defined","./defineProperties","./GoogleEarthEnterpriseTileInformation","./isBitSet","./Math","./Request","./Resource","./RuntimeError","./TaskProcessor"],function(e,t,r,i,n,o,a,s,l,u,c,d,h,p,f){"use strict";function m(e){var r=e;"string"==typeof r||r instanceof h||(r=e.url);var i=h.createIfNeeded(r);i.appendForwardSlash(),this._resource=i,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=c.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var n=this;this._readyPromise=v(this).then(function(){return n.getQuadTreePacket("",n._quadPacketVersion)}).then(function(){return!0}).otherwise(function(e){var r="An error occurred while accessing "+_(n,"",1).url+".";return t.reject(new p(r))})}function g(e,r,i){var n=e._tileInfo,o=r,s=n[o];if(a(s)&&(!s.hasSubtree()||s.hasChildren()))return s;for(;void 0===s&&o.length>1;)o=o.substring(0,o.length-1),s=n[o];var l,u=e._subtreePromises,c=u[o];return a(c)?c.then(function(){return l=new d({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),g(e,r,l)}):a(s)&&s.hasSubtree()?(c=e.getQuadTreePacket(o,s.cnodeVersion,i),a(c)?(u[o]=c,c.then(function(){return l=new d({throttle:i.throttle,throttleByServer:i.throttleByServer,type:i.type,priorityFunction:i.priorityFunction}),g(e,r,l)}).always(function(){delete u[o]})):void 0):t.reject(new p("Couldn't load metadata for tile "+r))}function _(e,t,r,i){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+r.toString(),request:i})}function v(t){var r=t._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});return r.fetchArrayBuffer().then(function(r){var i=e.EncryptedDbRootProto.decode(new Uint8Array(r)),n=i.encryptionData,o=n.byteOffset,a=o+n.byteLength,s=t.key=n.buffer.slice(o,a);n=i.dbrootData,o=n.byteOffset,a=o+n.byteLength;var l=n.buffer.slice(o,a);return b.scheduleTask({buffer:l,type:"DbRoot",key:s},[l])}).then(function(r){var i=e.DbRootProto.decode(new Uint8Array(r.buffer));if(t.imageryPresent=o(i.imageryPresent,t.imageryPresent),t.protoImagery=i.protoImagery,t.terrainPresent=o(i.terrainPresent,t.terrainPresent),a(i.endSnippet)&&a(i.endSnippet.model)){var s=i.endSnippet.model;t.negativeAltitudeExponentBias=o(s.negativeAltitudeExponentBias,t.negativeAltitudeExponentBias),t.negativeAltitudeThreshold=o(s.compressedNegativeAltitudeThreshold,t.negativeAltitudeThreshold)}a(i.databaseVersion)&&(t._quadPacketVersion=o(i.databaseVersion.quadtreeVersion,t._quadPacketVersion));for(var l=t.providers,u=o(i.providerInfo,[]),c=u.length,d=0;d<c;++d){var h=u[d],p=h.copyrightString;a(p)&&(l[h.providerId]=new n(p.value))}}).otherwise(function(){console.log("Failed to retrieve "+r.url+". Using defaults."),t.key=y})}var y=function(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n<t;++n)i[n]=e.charCodeAt(n);return r}('Eô½\vyâjE"�,�Í�qøI�FgQ\0B%Æèa,f)\bÆ4Üjb%y\nw�miÖð�k�¡½NuàA�[ß@V\fÙ»r��|�3SîOlÔq°{ÀE�VZ­wUe\v3�*¬�l5�Å�0sø3>mF8J´Ýð.Ý�u�Ú�Dt"�úa"\f3"So¯9D\v�9Ù9�L¹¿«\\�P_�"ux�éq�h;ÁÄ�ð<VqH�\'UfYNe��u£aF}a?�A\0���×´4MÎ��F°�Õ�¸�\'{�Ü+»Mg0ÈÑö\\Pú[/F�n5�/\'C.ë\n\f^��¥s�e4ål.jC\'c�#U©?q{gC}:¯ÍâTU�ýKÆâ�/(íË\\Æ-f§;/�*"N°k.Ý\r�}}GºC²�²+>Mª>}æÎI�Ææx\fa1-�¤O¥~q ì\r1èN\v\0nPh}�=\b\r��¦n£h$[kó�#ó¶s³\r\v@À�Ø�Q]ú��".�jßI\0¹ wUÆï�j¿{GL��îÜÜF
©­S+S4�ÿ��Y��ä8è1�N¹XFkË-#�p\x005"Ï1²&/çÃu-6,rt°#G·ÓÑ&�
7râ\0�DÏ�Ú3-�Þ`i#i*|ÍKQ\r�T9w.)ê�¦P¢joP�\\>TûïP[\vE��m(�w7�Û�JfJo� åpâ¹q~\fmI�-zþrÇòY0»�]såÉ êxì \'­xtOÂ�ÞV9\0Úw\vË-��û5O�õ\bQ�`Á\nZGM&�30xÚÀ�FGâ[y`In7gS\n>éìF9²ñ4\rÆ
                                                                Suná\fYÙ�Þ)
�{II¥wy¾IV.6ç\v:»O�b{ÒM1�/½8{¨O!áìFpv�})"x\n�Ý�\\ÚÞ�QÏðüYRe|3�ßóHÚ»*uÛ`²��Ôü�í�ì5¨ÿ(1-�ÈÜF|�["');s(m.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},resource:{get:function(){return this._resource}},readyPromise:{get:function(){return this._readyPromise}}}),m.tileXYToQuadKey=function(e,t,r){for(var i="",n=r;n>=0;--n){var o=1<<n,a=0;u(t,o)?u(e,o)&&(a|=1):(a|=2,u(e,o)||(a|=1)),i+=a}return i},m.quadKeyToTileXY=function(e){for(var t=0,r=0,i=e.length-1,n=i;n>=0;--n){var o=1<<n,a=+e[i-n];u(a,2)?u(a,1)||(t|=o):(r|=o,u(a,1)&&(t|=o))}return{x:t,y:r,level:i}},m.prototype.isValid=function(e){var t=this.getTileInformationFromQuadKey(e);if(a(t))return null!==t;for(var r,i=!0,n=e;n.length>1;){if(r=n.substring(n.length-1),n=n.substring(0,n.length-1),t=this.getTileInformationFromQuadKey(n),a(t)){t.hasSubtree()||t.hasChild(parseInt(r))||(i=!1);break}if(null===t){i=!1;break}}return i};var b=new f("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);return m.prototype.getQuadTreePacket=function(e,t,r){t=o(t,1),e=o(e,"");var i=_(this,e,t,r),n=i.fetchArrayBuffer();if(a(n)){var s=this._tileInfo,u=this.key;return n.then(function(t){return b.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:u},[t]).then(function(t){var r,i=-1;if(""!==e){i=e.length+1;var n=t[e];r=s[e],r._bits|=n._bits,delete t[e]}var o=Object.keys(t);o.sort(function(e,t){return e.length-t.length});for(var a=o.length,u=0;u<a;++u){var c=o[u];if(null!==t[c]){var d=l.clone(t[c]),h=c.length;if(h===i)d.setParent(r);else if(h>1){var p=s[c.substring(0,c.length-1)];d.setParent(p)}s[c]=d}else s[c]=null}})})}},m.prototype.populateSubtree=function(e,t,r,i){return g(this,m.tileXYToQuadKey(e,t,r),i)},m.prototype.getTileInformation=function(e,t,r){var i=m.tileXYToQuadKey(e,t,r);return this._tileInfo[i]},m.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]},m}),define("Core/GoogleEarthEnterpriseTerrainData",["./BoundingSphere","./Cartesian2","./Cartesian3","./Check","./defaultValue","./defined","./defineProperties","./DeveloperError","./IndexDatatype","./Intersections2D","./Math","./OrientedBoundingBox","./QuantizedMeshTerrainData","./Rectangle","./TaskProcessor","./TerrainEncoding","./TerrainMesh"],function(e,t,r,i,n,o,a,s,l,u,c,d,h,p,f,m,g){"use strict";function _(e){e=n(e,n.EMPTY_OBJECT),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=n(e.childTileMask,15),r=3&t;r|=4&t?8:0,r|=8&t?4:0,this._childTileMask=r,this._createdByUpsampling=n(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0,this._vertexCountWithoutSkirts=void 0,this._skirtIndex=void 0}function v(e,t,r){for(var i=e._mesh,n=i.vertices,o=i.encoding,a=i.indices,s=0,l=a.length;s<l;s+=3){var c=a[s],d=a[s+1],h=a[s+2],p=o.decodeTextureCoordinates(n,c,w),f=o.decodeTextureCoordinates(n,d,A),m=o.decodeTextureCoordinates(n,h,E),g=u.computeBarycentricCoordinates(t,r,p.x,p.y,f.x,f.y,m.x,m.y,x);if(g.x>=-1e-15&&g.y>=-1e-15&&g.z>=-1e-15){var _=o.decodeHeight(n,c),v=o.decodeHeight(n,d),y=o.decodeHeight(n,h);return g.x*_+g.y*v+g.z*y}}}function y(e,t,r,i){var n=e._buffer,o=0,a=0,s=0;r>.5?(t>.5?(o=2,a=.5):o=3,s=.5):t>.5&&(o=1,a=.5);for(var l=new DataView(n),d=0,h=0;h<o;++h)d+=l.getUint32(d,!0),d+=D;d+=D,d+=2*M;var p=c.toRadians(180*l.getFloat64(d,!0));d+=M;var f=c.toRadians(180*l.getFloat64(d,!0));d+=M;var m=i.width/p/2,g=i.height/f/2,_=l.getInt32(d,!0);d+=I;var v=3*l.getInt32(d,!0);d+=I,d+=I;var y,b=new Array(_),C=new Array(_),S=new Array(_);for(y=0;y<_;++y)b[y]=a+l.getUint8(d++)*m,C[y]=s+l.getUint8(d++)*g,S[y]=6371010*l.getFloat32(d,!0),d+=O;var T=new Array(v);for(y=0;y<v;++y)T[y]=l.getUint16(d,!0),d+=P;for(y=0;y<v;y+=3){var w=T[y],A=T[y+1],E=T[y+2],R=b[w],L=b[A],N=b[E],k=C[w],F=C[A],B=C[E],U=u.computeBarycentricCoordinates(t,r,R,k,L,F,N,B,x);if(U.x>=-1e-15&&U.y>=-1e-15&&U.z>=-1e-15)return U.x*S[w]+U.y*S[A]+U.z*S[E]}}a(_.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var b=new f("createVerticesFromGoogleEarthEnterpriseBuffer"),C=new p,S=new p;_.prototype.createMesh=function(e,t,r,i,a){var s=e.ellipsoid;e.tileXYToNativeRectangle(t,r,i,C),e.tileXYToRectangle(t,r,i,S),a=n(a,1);var l=s.cartographicToCartesian(p.center(S)),u=40075.16/(1<<i);this._skirtHeight=Math.min(8*u,1e3);var c=b.scheduleTask({buffer:this._buffer,nativeRectangle:C,rectangle:S,relativeToCenter:l,ellipsoid:s,skirtHeight:this._skirtHeight,exaggeration:a,includeWebMercatorT:!0,negativeAltitudeExponentBias:this._negativeAltitudeExponentBias,negativeElevationThreshold:this._negativeElevationThreshold});if(o(c)){var d=this;return c.then(function(e){return d._mesh=new g(l,new Float32Array(e.vertices),new Uint16Array(e.indices),e.minimumHeight,e.maximumHeight,e.boundingSphere3D,e.occludeePointInScaledSpace,e.numberOfAttributes,e.orientedBoundingBox,m.clone(e.encoding),a),d._vertexCountWithoutSkirts=e.vertexCountWithoutSkirts,d._skirtIndex=e.skirtIndex,d._minimumHeight=e.minimumHeight,d._maximumHeight=e.maximumHeight,d._buffer=void 0,d._mesh})}},_.prototype.interpolateHeight=function(e,t,r){var i=c.clamp((t-e.west)/e.width,0,1),n=c.clamp((r-e.south)/e.height,0,1);return o(this._mesh)?v(this,i,n):y(this,i,n,e)};var T=new f("upsampleQuantizedTerrainMesh");_.prototype.upsample=function(t,i,n,a,s,u,c){var p=this._mesh;if(o(this._mesh)){var f=2*i!==s,m=2*n===u,g=t.ellipsoid,_=t.tileXYToRectangle(s,u,c),v=T.scheduleTask({vertices:p.vertices,vertexCountWithoutSkirts:this._vertexCountWithoutSkirts,indices:p.indices,skirtIndex:this._skirtIndex,encoding:p.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:f,isNorthChild:m,childRectangle:_,ellipsoid:g,exaggeration:p.exaggeration});if(o(v)){var y=this;return v.then(function(t){var i=new Uint16Array(t.vertices),n=l.createTypedArray(i.length/3,t.indices),o=y._skirtHeight;return new h({quantizedVertices:i,indices:n,minimumHeight:t.minimumHeight,maximumHeight:t.maximumHeight,boundingSphere:e.clone(t.boundingSphere),orientedBoundingBox:d.clone(t.orientedBoundingBox),horizonOcclusionPoint:r.clone(t.horizonOcclusionPoint),westIndices:t.westIndices,southIndices:t.southIndices,eastIndices:t.eastIndices,northIndices:t.northIndices,westSkirtHeight:o,southSkirtHeight:o,eastSkirtHeight:o,northSkirtHeight:o,childTileMask:0,createdByUpsampling:!0,credits:y._credits})})}}},_.prototype.isChildAvailable=function(e,t,r,i){var n=2;return r!==2*e&&++n,i!==2*t&&(n-=2),0!=(this._childTileMask&1<<n)},_.prototype.wasCreatedByUpsampling=function(){return this._createdByUpsampling};var w=new t,A=new t,E=new t,x=new r,P=Uint16Array.BYTES_PER_ELEMENT,D=Uint32Array.BYTES_PER_ELEMENT,I=Int32Array.BYTES_PER_ELEMENT,O=Float32Array.BYTES_PER_ELEMENT,M=Float64Array.BYTES_PER_ELEMENT;return _}),define("Core/GoogleEarthEnterpriseTerrainProvider",["../ThirdParty/when","./Credit","./defaultValue","./defined","./defineProperties","./DeveloperError","./Event","./GeographicTilingScheme","./GoogleEarthEnterpriseMetadata","./GoogleEarthEnterpriseTerrainData","./HeightmapTerrainData","./JulianDate","./Math","./Rectangle","./Request","./RequestState","./RequestType","./Resource","./RuntimeError","./TaskProcessor","./TileProviderError"],function(e,t,r,i,n,o,a,s,l,u,c,d,h,p,f,m,g,_,v,y,b){"use strict";function C(){this._terrainCache={},this._lastTidy=d.now()}function S(n){n=r(n,{});var o;if(i(n.metadata))o=n.metadata;else{var u=_.createIfNeeded(n.url);o=new l(u)}this._metadata=o,this._tilingScheme=new s({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new p(-h.PI,-h.PI,h.PI,h.PI),ellipsoid:n.ellipsoid});var c=n.credit;"string"==typeof c&&(c=new t(c)),this._credit=c,this._levelZeroMaximumGeometricError=40075.16,this._terrainCache=new C,this._terrainPromises={},this._terrainRequests={},this._errorEvent=new a,this._ready=!1;var d,f=this;this._readyPromise=o.readyPromise.then(function(t){if(!o.terrainPresent){var r=new v("The server "+o.url+" doesn't have terrain");return d=b.handleError(d,f,f._errorEvent,r.message,void 0,void 0,void 0,r),e.reject(r)}return b.handleSuccess(d),f._ready=t,t}).otherwise(function(t){return d=b.handleError(d,f,f._errorEvent,t.message,void 0,void 0,void 0,t),e.reject(t)})}function T(e,t,r){var n=t.getChildBitmask();if(t.terrainState===A.PARENT){n=0;for(var o=0;o<4;++o){var a=r.getTileInformationFromQuadKey(e+o.toString());i(a)&&a.hasTerrain()&&(n|=1<<o)}}return n}function w(e,t,r,n){return r=i(r)&&r>0?r:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+r.toString(),request:n})}var A={UNKNOWN:0,NONE:1,SELF:2,PARENT:3},E=new d;C.prototype.add=function(e,t){this._terrainCache[e]={buffer:t,timestamp:d.now()}},C.prototype.get=function(e){var t=this._terrainCache,r=t[e];if(i(r))return delete this._terrainCache[e],r.buffer},C.prototype.tidy=function(){if(d.now(E),d.secondsDifference(E,this._lastTidy)>10){for(var e=this._terrainCache,t=Object.keys(e),r=t.length,i=0;i<r;++i){var n=t[i],o=e[n];d.secondsDifference(E,o.timestamp)>10&&delete e[n]}d.clone(E,this._lastTidy)}},n(S.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var x=new y("decodeGoogleEarthEnterprisePacket",Number.POSITIVE_INFINITY);return S.prototype.requestTileGeometry=function(t,r,n,o){var a=l.tileXYToQuadKey(t,r,n),s=this._terrainCache,d=this._metadata,h=d.getTileInformationFromQuadKey(a);if(!i(h))return e.reject(new v("Terrain tile doesn't exist"));var p=h.terrainState;i(p)||(p=h.terrainState=A.UNKNOWN);var f=s.get(a);if(i(f)){var g=d.providers[h.terrainProvider];return new u({buffer:f,childTileMask:T(a,h,d),credits:i(g)?[g]:void 0,negativeAltitudeExponentBias:d.negativeAltitudeExponentBias,negativeElevationThreshold:d.negativeAltitudeThreshold})}if(s.tidy(),!h.ancestorHasTerrain)return new c({buffer:new Uint8Array(256),width:16,height:16});if(p===A.NONE)return e.reject(new v("Terrain tile doesn't exist"));var _,y=a,b=-1;switch(p){case A.SELF:b=h.terrainVersion;break;case A.PARENT:y=y.substring(0,y.length-1),_=d.getTileInformationFromQuadKey(y),b=_.terrainVersion;break;case A.UNKNOWN:h.hasTerrain()?b=h.terrainVersion:(y=y.substring(0,y.length-1),_=d.getTileInformationFromQuadKey(y),i(_)&&_.hasTerrain()&&(b=_.terrainVersion))}if(b<0)return e.reject(new v("Terrain tile doesn't exist"));var C,S,E=this._terrainPromises,P=this._terrainRequests;if(i(E[y]))C=E[y],S=P[y];else{S=o;var D=w(this,y,b,S).fetchArrayBuffer();if(!i(D))return;C=D.then(function(t){return i(t)?x.scheduleTask({buffer:t,type:"Terrain",key:d.key},[t]).then(function(e){var t=d.getTileInformationFromQuadKey(y);t.terrainState=A.SELF,s.add(y,e[0]);for(var r=t.terrainProvider,n=e.length-1,o=0;o<n;++o){var a=y+o.toString(),l=d.getTileInformationFromQuadKey(a);i(l)&&(s.add(a,e[o+1]),l.terrainState=A.PARENT,0===l.terrainProvider&&(l.terrainProvider=r))}}):e.reject(new v("Failed to load terrain."))}),E[y]=C,P[y]=S,C=C.always(function(){delete E[y],delete P[y]})}return C.then(function(){var t=s.get(a);if(i(t)){var r=d.providers[h.terrainProvider];return new u({buffer:t,childTileMask:T(a,h,d),credits:i(r)?[r]:void 0,negativeAltitudeExponentBias:d.negativeAltitudeExponentBias,negativeElevationThreshold:d.negativeAltitudeThreshold})}return e.reject(new v("Failed to load terrain."))}).otherwise(function(t){return S.state===m.CANCELLED?(o.state=S.state,e.reject(t)):(h.terrainState=A.NONE,e.reject(t))})},S.prototype.getLevelMaximumGeometricError=function(e){return this._levelZeroMaximumGeometricError/(1<<e)},S.prototype.getTileDataAvailable=function(e,t,r){var n=this._metadata,o=l.tileXYToQuadKey(e,t,r),a=n.getTileInformation(e,t,r);if(null===a)return!1;if(i(a)){if(!a.ancestorHasTerrain)return!0;var s=a.terrainState;if(s===A.NONE)return!1;if(!(i(s)&&s!==A.UNKNOWN||(a.terrainState=A.UNKNOWN,a.hasTerrain()))){o=o.substring(0,o.length-1);var u=n.getTileInformationFromQuadKey(o);if(!i(u)||!u.hasTerrain())return!1}return!0}if(n.isValid(o)){var c=new f({throttle:!0,throttleByServer:!0,type:g.TERRAIN});n.populateSubtree(e,t,r,c)}return!1},S}),define("Core/HeadingPitchRange",["./defaultValue","./defined"],function(e,t){"use strict";function r(t,r,i){this.heading=e(t,0),this.pitch=e(r,0),this.range=e(i,0)}return r.clone=function(e,i){if(t(e))return t(i)||(i=new r),i.heading=e.heading,i.pitch=e.pitch,i.range=e.range,i},r}),define("Core/HeadingPitchRoll",["./defaultValue","./defined","./DeveloperError","./Math"],function(e,t,r,i){"use strict";function n(t,r,i){this.heading=e(t,0),this.pitch=e(r,0),this.roll=e(i,0)}return n.fromQuaternion=function(e,r){t(r)||(r=new n);var i=2*(e.w*e.y-e.z*e.x),o=1-2*(e.x*e.x+e.y*e.y),a=2*(e.w*e.x+e.y*e.z),s=1-2*(e.y*e.y+e.z*e.z),l=2*(e.w*e.z+e.x*e.y);return r.heading=-Math.atan2(l,s),r.roll=Math.atan2(a,o),r.pitch=-Math.asin(i),r},n.fromDegrees=function(e,r,o,a){return t(a)||(a=new n),a.heading=e*i.RADIANS_PER_DEGREE,a.pitch=r*i.RADIANS_PER_DEGREE,a.roll=o*i.RADIANS_PER_DEGREE,a},n.clone=function(e,r){if(t(e))return t(r)?(r.heading=e.heading,r.pitch=e.pitch,r.roll=e.roll,r):new n(e.heading,e.pitch,e.roll)},n.equals=function(e,r){return e===r||t(e)&&t(r)&&e.heading===r.heading&&e.pitch===r.pitch&&e.roll===r.roll},n.equalsEpsilon=function(e,r,n,o){return e===r||t(e)&&t(r)&&i.equalsEpsilon(e.heading,r.heading,n,o)&&i.equalsEpsilon(e.pitch,r.pitch,n,o)&&i.equalsEpsilon(e.roll,r.roll,n,o)},n.prototype.clone=function(e){return n.clone(this,e)},n.prototype.equals=function(e){return n.equals(this,e)},n.prototype.equalsEpsilon=function(e,t,r){return n.equalsEpsilon(this,e,t,r)},n.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"},n}),define("Core/HermitePolynomialApproximation",["./defaultValue","./defined","./DeveloperError","./Math"],function(e,t,r,i){"use strict";function n(e,t,r,i,o,a){var s,l,u,c=0;if(i>0){for(l=0;l<o;l++){for(s=!1,u=0;u<a.length&&!s;u++)l===a[u]&&(s=!0);s||(a.push(l),c+=n(e,t,r,i-1,o,a),a.splice(a.length-1,1))}return c}for(c=1,l=0;l<o;l++){for(s=!1,u=0;u<a.length&&!s;u++)l===a[u]&&(s=!0);s||(c*=e-r[t[l]])}return c}function o(e,t,r,n,o,a){for(var s,l,u=-1,c=t.length,d=c*(c+1)/2,h=0;h<o;h++){var p=Math.floor(h*d);for(s=0;s<c;s++)l=t[s]*o*(a+1)+h,e[p+s]=n[l];for(var f=1;f<c;f++){var m=0,g=Math.floor(f*(1-f)/2)+c*f,_=!1;for(s=0;s<c-f;s++){var v,y,b=r[t[s]],C=r[t[s+f]];if(C-b<=0)l=t[s]*o*(a+1)+o*f+h,v=n[l],y=v/i.factorial(f),e[p+g+m]=y,m++;else{var S=Math.floor((f-1)*(2-f)/2)+c*(f-1);v=e[p+S+s+1]-e[p+S+s],y=v/(C-b),e[p+g+m]=y,m++}_=_||0!==v}_&&(u=Math.max(u,f))}}return u}var a=i.factorial,s={type:"Hermite"};s.getRequiredDataPoints=function(t,r){return r=e(r,0),Math.max(Math.floor((t+1)/(r+1)),2)},s.interpolateOrderZero=function(e,r,i,o,s){t(s)||(s=new Array(o));var l,u,c,d,h,p,f=r.length,m=new Array(o);for(l=0;l<o;l++){s[l]=0;var g=new Array(f);for(m[l]=g,u=0;u<f;u++)g[u]=[]}var _=f,v=new Array(_);for(l=0;l<_;l++)v[l]=l;var y=f-1;for(d=0;d<o;d++){for(u=0;u<_;u++)p=v[u]*o+d,m[d][0].push(i[p]);for(l=1;l<_;l++){var b=!1;for(u=0;u<_-l;u++){var C,S=r[v[u]],T=r[v[u+l]];T-S<=0?(p=v[u]*o+o*l+d,C=i[p],m[d][l].push(C/a(l))):(C=m[d][l-1][u+1]-m[d][l-1][u],m[d][l].push(C/(T-S))),b=b||0!==C}b||(y=l-1)}}for(c=0,h=0;c<=h;c++)for(l=c;l<=y;l++){var w=n(e,v,r,c,l,[]);for(d=0;d<o;d++){var A=m[d][l][0];s[d+c*o]+=A*w}}return s};var l=[];return s.interpolate=function(e,r,i,a,s,u,c){var d=a*(u+1);t(c)||(c=new Array(d));for(var h=0;h<d;h++)c[h]=0
ERROR: 
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.

If you want to test you can add Cesium.js from https://github.com/AnalyticalGraphicsInc/cesium to a mercurial repo and run sonarqube-scanner on that repo.

@simonbrandhof
Copy link
Contributor

Ticket moved to https://jira.sonarsource.com/browse/SONARHG-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants