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

Inconsistent line endings (LF vs CRLF) #4238

Closed
liamdon opened this issue May 11, 2022 · 2 comments · Fixed by #4241
Closed

Inconsistent line endings (LF vs CRLF) #4238

liamdon opened this issue May 11, 2022 · 2 comments · Fixed by #4241

Comments

@liamdon
Copy link
Contributor

liamdon commented May 11, 2022

Description

Line endings across the codebase are inconsistent between CRLF (Windows) and LF (Unix).
95% of files use LF (Unix), and the other 5% use CRLF (30 files total). There are no cases of line endings being mixed in one file.

This is definitely a nitpick issue, but it would be nice to fix to avoid any ambiguity for future contributors.

I've opened this as an issue rather than a PR because the diff would change every line in 30 files, making it hard to review and potentially a security concern. Instead, I've added some instructions on how to fix it below.

Instructions to fix

Install dos2unix util:

brew install dos2unix

Print a report of all line endings without changing anything (see this output in table below):

find ./src -type f -print0 | xargs -0 dos2unix -i

Convert all the line endings to LF:

find ./src -type f -print0 | xargs -0 dos2unix

Full report of line ending counts

Expand table
File Windows (CRLF) Unix (LF)
./anim/constants.js 0 23
./anim/evaluator/anim-data.js 0 39
./anim/evaluator/anim-clip.js 0 200
./anim/evaluator/anim-target-value.js 0 133
./anim/evaluator/anim-evaluator.js 0 365
./anim/evaluator/anim-target.js 0 67
./anim/evaluator/anim-cache.js 0 144
./anim/evaluator/anim-track.js 0 116
./anim/evaluator/anim-curve.js 0 65
./anim/evaluator/anim-events.js 0 32
./anim/evaluator/anim-snapshot.js 0 46
./anim/binder/anim-binder.js 0 100
./anim/binder/default-anim-binder.js 0 252
./anim/state-graph/anim-state-graph.js 0 135
./anim/controller/constants.js 0 163
./anim/controller/anim-controller.js 0 593
./anim/controller/anim-node.js 0 100
./anim/controller/anim-transition.js 0 88
./anim/controller/anim-blend-tree-2d-directional.js 0 65
./anim/controller/anim-blend-tree-2d-cartesian.js 0 58
./anim/controller/anim-blend-tree-1d.js 0 69
./anim/controller/anim-blend-tree.js 0 105
./anim/controller/anim-state.js 0 165
./anim/controller/anim-blend-tree-direct.js 0 38
./compress/decompress.js 0 73
./compress/compress-utils.js 0 75
./shape/bounding-sphere.js 0 95
./shape/ray.js 0 53
./shape/oriented-box.js 0 114
./shape/bounding-box.js 0 431
./shape/frustum.js 0 224
./shape/plane.js 0 68
./net/http.js 0 587
./core/sort.js 0 15
./core/events.js 0 35
./core/set-utils.js 0 18
./core/ref-counted-cache.js 0 59
./core/guid.js 0 22
./core/preprocessor.js 0 277
./core/core.js 0 99
./core/indexed-list.js 0 104
./core/object-pool.js 0 30
./core/tags.js 0 263
./core/time.js 0 53
./core/ref-counted-object.js 0 37
./core/event-handler.js 0 263
./core/string.js 0 265
./core/tags-cache.js 0 144
./core/sorted-loop-array.js 0 145
./core/path.js 0 217
./core/platform.js 0 163
./core/hash.js 0 18
./core/debug.js 0 105
./core/read-stream.js 0 92
./core/uri.js 0 190
./asset/constants.js 0 119
./asset/asset-registry.js 0 689
./asset/asset-localized.js 0 224
./asset/asset.js 0 548
./asset/asset-reference.js 0 144
./asset/asset-list-loader.js 0 208
./asset/asset-file.js 0 28
./framework/constants.js 0 37
./framework/globals.js 0 14
./framework/app-options.js 0 121
./framework/scene-registry.js 0 416
./framework/utils/entity-reference.js 0 423
./framework/script.js 0 181
./framework/components/anim/component-binder.js 0 296
./framework/components/anim/system.js 0 141
./framework/components/anim/component-layer.js 0 373
./framework/components/anim/component.js 0 756
./framework/components/anim/data.js 0 7
./framework/components/scroll-view/constants.js 0 34
./framework/components/scroll-view/system.js 0 98
./framework/components/scroll-view/component.js 0 698
./framework/components/scroll-view/data.js 0 7
./framework/components/particle-system/system.js 0 287
./framework/components/particle-system/component.js 0 988
./framework/components/particle-system/data.js 0 90
./framework/components/registry.js 0 276
./framework/components/system.js 0 217
./framework/components/camera/system.js 171 0
./framework/components/camera/component.js 0 648
./framework/components/camera/data.js 7 0
./framework/components/camera/post-effect-queue.js 0 423
./framework/components/zone/system.js 0 66
./framework/components/zone/component.js 0 126
./framework/components/zone/data.js 0 7
./framework/components/element/constants.js 0 41
./framework/components/element/markup.js 0 509
./framework/components/element/system.js 0 638
./framework/components/element/element-drag-helper.js 0 252
./framework/components/element/component.js 0 1795
./framework/components/element/image-element.js 0 1315
./framework/components/element/data.js 0 7
./framework/components/element/text-element.js 0 1867
./framework/components/render/system.js 0 127
./framework/components/render/component.js 0 921
./framework/components/render/data.js 0 8
./framework/components/animation/system.js 0 135
./framework/components/animation/component.js 702 0
./framework/components/animation/data.js 0 7
./framework/components/script-legacy/system.js 0 520
./framework/components/script-legacy/component.js 0 210
./framework/components/script-legacy/data.js 0 18
./framework/components/layout-child/system.js 0 65
./framework/components/layout-child/component.js 0 156
./framework/components/layout-child/data.js 0 7
./framework/components/script/system.js 0 208
./framework/components/script/component.js 0 987
./framework/components/script/data.js 0 7
./framework/components/component.js 0 115
./framework/components/audio-source/system.js 0 138
./framework/components/audio-source/component.js 367 0
./framework/components/audio-source/data.js 28 0
./framework/components/button/constants.js 0 13
./framework/components/button/system.js 0 83
./framework/components/button/component.js 0 660
./framework/components/button/data.js 0 27
./framework/components/rigid-body/constants.js 0 59
./framework/components/rigid-body/system.js 0 927
./framework/components/rigid-body/component.js 0 1025
./framework/components/rigid-body/data.js 0 7
./framework/components/audio-listener/system.js 0 70
./framework/components/audio-listener/component.js 42 0
./framework/components/audio-listener/data.js 8 0
./framework/components/screen/constants.js 0 14
./framework/components/screen/system.js 0 141
./framework/components/screen/component.js 0 309
./framework/components/screen/data.js 0 7
./framework/components/joint/constants.js 0 23
./framework/components/joint/system.js 0 43
./framework/components/joint/component.js 0 515
./framework/components/joint/data.js 0 7
./framework/components/model/system.js 0 159
./framework/components/model/component.js 0 1152
./framework/components/model/data.js 0 7
./framework/components/sprite/constants.js 0 13
./framework/components/sprite/system.js 0 267
./framework/components/sprite/component.js 0 986
./framework/components/sprite/data.js 0 7
./framework/components/sprite/sprite-animation-clip.js 0 488
./framework/components/light/system.js 0 120
./framework/components/light/component.js 0 539
./framework/components/light/data.js 0 19
./framework/components/layout-group/constants.js 0 27
./framework/components/layout-group/system.js 0 139
./framework/components/layout-group/component.js 0 365
./framework/components/layout-group/data.js 0 7
./framework/components/layout-group/layout-calculator.js 0 663
./framework/components/sound/slot.js 0 718
./framework/components/sound/system.js 0 185
./framework/components/sound/component.js 0 538
./framework/components/sound/data.js 0 7
./framework/components/scrollbar/system.js 0 53
./framework/components/scrollbar/component.js 0 197
./framework/components/scrollbar/data.js 0 7
./framework/components/collision/system.js 0 811
./framework/components/collision/component.js 0 449
./framework/components/collision/trigger.js 0 133
./framework/components/collision/data.js 0 22
./framework/scene-registry-item.js 0 48
./framework/app-base.js 0 2178
./framework/scene-depth.js 0 263
./framework/application.js 0 218
./framework/entity.js 0 712
./framework/stats.js 0 107
./input/constants.js 0 793
./input/touch-device.js 0 82
./input/keyboard-event.js 0 50
./input/game-pads.js 0 244
./input/mouse-event.js 0 155
./input/controller.js 0 406
./input/element-input.js 0 1194
./input/keyboard.js 0 342
./input/touch-event.js 0 150
./input/mouse.js 0 314
./resources/html.js 0 43
./resources/folder.js 0 18
./resources/hierarchy.js 0 35
./resources/anim-clip.js 0 84
./resources/basis-worker.js 0 432
./resources/font.js 0 165
./resources/scene.js 0 58
./resources/material.js 0 348
./resources/binary.js 0 44
./resources/bundle.js 0 101
./resources/basis.js 0 356
./resources/render.js 0 89
./resources/handler.js 0 63
./resources/anim-state-graph.js 0 59
./resources/parser/json-model.js 0 439
./resources/parser/scene.js 0 121
./resources/parser/glb-parser.js 0 2340
./resources/parser/glb-model.js 0 21
./resources/parser/glb-container-resource.js 0 316
./resources/parser/texture/ktx.js 0 167
./resources/parser/texture/basis.js 0 68
./resources/parser/texture/hdr.js 0 191
./resources/parser/texture/dds.js 0 170
./resources/parser/texture/img.js 0 141
./resources/parser/texture/ktx2.js 0 139
./resources/parser/material/json-standard-material.js 0 178
./resources/shader.js 0 43
./resources/script.js 124 0
./resources/audio.js 205 0
./resources/json.js 0 50
./resources/texture-atlas.js 0 231
./resources/sprite.js 0 154
./resources/cubemap.js 0 327
./resources/css.js 0 65
./resources/model.js 0 178
./resources/animation.js 0 154
./resources/container.js 0 193
./resources/untar.js 0 367
./resources/scene-settings.js 0 18
./resources/template.js 0 46
./resources/scene-utils.js 0 45
./resources/text.js 0 43
./resources/texture.js 0 314
./resources/loader.js 0 307
./animation/skeleton.js 292 0
./animation/animation.js 80 0
./xr/constants.js 0 176
./xr/xr-hit-test-source.js 0 155
./xr/xr-plane.js 0 187
./xr/xr-tracked-image.js 0 226
./xr/xr-hit-test.js 0 322
./xr/xr-input.js 0 290
./xr/xr-plane-detection.js 0 204
./xr/xr-joint.js 0 236
./xr/xr-image-tracking.js 0 214
./xr/xr-light-estimation.js 0 290
./xr/xr-hand.js 0 307
./xr/xr-dom-overlay.js 0 120
./xr/xr-finger.js 0 83
./xr/xr-manager.js 0 837
./xr/xr-input-source.js 0 638
./xr/xr-depth-sensing.js 0 462
./index.js 0 308
./math/constants.js 0 47
./math/mat3.js 0 261
./math/random.js 0 96
./math/float-packing.js 0 141
./math/curve-evaluator.js 0 205
./math/color.js 0 276
./math/vec4.js 609 0
./math/vec3.js 698 0
./math/curve-set.js 0 184
./math/math.js 0 272
./math/vec2.js 628 0
./math/curve.js 0 201
./math/quat.js 682 0
./math/mat4.js 0 1281
./script/script-registry.js 0 220
./script/script-type.js 0 393
./script/script-attributes.js 0 363
./script/script.js 0 151
./audio/constants.js 0 20
./audio/channel.js 322 0
./audio/channel3d.js 207 0
./audio/capabilities.js 0 11
./package.json 0 3
./templates/template.js 0 44
./font/constants.js 0 2
./font/font.js 0 71
./font/canvas-font.js 0 483
./scene/constants.js 0 802
./scene/graph-node.js 0 1587
./scene/particle-system/gpu-updater.js 0 198
./scene/particle-system/particle-emitter.js 0 1293
./scene/particle-system/cpu-updater.js 0 467
./scene/renderer/light-camera.js 0 85
./scene/renderer/shadow-map-cache.js 0 68
./scene/renderer/cookie-renderer.js 0 157
./scene/renderer/shadow-renderer.js 0 648
./scene/renderer/shadow-map.js 0 169
./scene/renderer/forward-renderer.js 0 1926
./scene/renderer/static-meshes.js 0 326
./scene/mesh-instance.js 0 806
./scene/materials/material.js 0 514
./scene/materials/standard-material-options-builder.js 0 369
./scene/materials/default-material.js 0 34
./scene/materials/standard-material-validator.js 0 183
./scene/materials/standard-material.js 0 1136
./scene/materials/standard-material-parameters.js 0 219
./scene/materials/basic-material.js 100 0
./scene/morph.js 0 294
./scene/mesh.js 986 0
./scene/scene.js 0 844
./scene/stencil-parameters.js 0 50
./scene/picker.js 0 343
./scene/procedural.js 0 1064
./scene/skin-instance.js 0 191
./scene/render.js 0 93
./scene/light.js 0 785
./scene/skin-partition.js 407 0
./scene/immediate/immediate.js 0 277
./scene/immediate/immediate-batch.js 0 104
./scene/immediate/immediate-batches.js 0 28
./scene/composition/render-action.js 0 89
./scene/composition/layer-composition.js 0 1074
./scene/composition/light-composition-data.js 0 30
./scene/lightmapper/bake-light.js 0 76
./scene/lightmapper/lightmapper.js 0 1143
./scene/lightmapper/bake-light-ambient.js 0 55
./scene/lightmapper/lightmap-filters.js 0 76
./scene/lightmapper/bake-mesh-node.js 0 30
./scene/lightmapper/bake-light-simple.js 0 43
./scene/lightmapper/lightmap-cache.js 0 23
./scene/skin.js 25 0
./scene/morph-target.js 0 137
./scene/batching/batch.js 0 69
./scene/batching/batch-manager.js 0 964
./scene/batching/batch-group.js 0 54
./scene/batching/skin-batch-instance.js 0 49
./scene/lighting/lights-buffer.js 0 495
./scene/lighting/lighting-params.js 0 121
./scene/lighting/world-clusters.js 0 454
./scene/lighting/light-texture-atlas.js 0 389
./scene/lighting/world-clusters-debug.js 0 193
./scene/texture-atlas.js 0 138
./scene/skin-instance-cache.js 0 136
./scene/camera.js 0 486
./scene/sprite.js 0 378
./scene/morph-instance.js 0 401
./scene/model.js 0 210
./scene/area-light-luts.js 0 169
./scene/layer.js 0 919
./graphics/constants.js 0 1162
./graphics/env-lighting.js 0 313
./graphics/transform-feedback.js 0 191
./graphics/prefilter-cubemap.js 0 224
./graphics/scope-id.js 0 50
./graphics/program-library.js 171 0
./graphics/vertex-iterator.js 402 0
./graphics/vertex-buffer.js 0 145
./graphics/webgl/webgl-graphics-device.js 0 2721
./graphics/webgl/webgl-texture.js 0 493
./graphics/webgl/webgl-buffer.js 0 54
./graphics/webgl/webgl-vertex-buffer.js 0 33
./graphics/webgl/webgl-shader.js 0 338
./graphics/webgl/webgl-index-buffer.js 0 31
./graphics/webgl/webgl-render-target.js 0 205
./graphics/version.js 0 24
./graphics/shader.js 0 90
./graphics/shader-input.js 0 51
./graphics/graphics-device.js 0 345
./graphics/vertex-format.js 0 250
./graphics/index-buffer.js 0 229
./graphics/versioned-object.js 0 23
./graphics/debug-graphics.js 0 30
./graphics/grab-pass.js 0 177
./graphics/post-effect.js 182 0
./graphics/simple-post-effect.js 0 150
./graphics/reproject-texture.js 0 560
./graphics/scope-space.js 0 56
./graphics/program-lib/program-lib.js 0 24
./graphics/program-lib/chunks/tonemappingFilmic.frag.js 0 23
./graphics/program-lib/chunks/gamma1_0.frag.js 0 29
./graphics/program-lib/chunks/precisionTest.frag.js 0 5
./graphics/program-lib/chunks/skinBatchTex.vert.js 0 29
./graphics/program-lib/chunks/lit/reflectionSphereLow.frag.js 0 15
./graphics/program-lib/chunks/lit/normalInstanced.vert.js 0 6
./graphics/program-lib/chunks/lit/clusteredLightUtils.frag.js 0 64
./graphics/program-lib/chunks/lit/shadowCoordPerspZbuffer.frag.js 0 18
./graphics/program-lib/chunks/lit/reflectionEnv.frag.js 0 59
./graphics/program-lib/chunks/lit/fogLinear.frag.js 0 14
./graphics/program-lib/chunks/lit/end.frag.js 0 15
./graphics/program-lib/chunks/lit/end.vert.js 0 2
./graphics/program-lib/chunks/lit/aoSpecOccConst.frag.js 0 11
./graphics/program-lib/chunks/lit/specularAaNone.frag.js 0 5
./graphics/program-lib/chunks/lit/falloffLinear.frag.js 0 6
./graphics/program-lib/chunks/lit/reflectionCC.frag.js 0 9
./graphics/program-lib/chunks/lit/lightDiffuseLambert.frag.js 0 5
./graphics/program-lib/chunks/lit/ambientSH.frag.js 0 20
./graphics/program-lib/chunks/lit/tangentBinormal.vert.js 0 13
./graphics/program-lib/chunks/lit/viewDir.frag.js 0 5
./graphics/program-lib/chunks/lit/cubeMapProjectBox.frag.js 0 21
./graphics/program-lib/chunks/lit/aoSpecOcc.frag.js 0 14
./graphics/program-lib/chunks/lit/reflDir.frag.js 0 5
./graphics/program-lib/chunks/lit/lightmapSingle.frag.js 0 19
./graphics/program-lib/chunks/lit/spot.frag.js 0 6
./graphics/program-lib/chunks/lit/normalVertex.frag.js 0 5
./graphics/program-lib/chunks/lit/reflDirAniso.frag.js 0 11
./graphics/program-lib/chunks/lit/outputAlphaOpaque.frag.js 0 3
./graphics/program-lib/chunks/lit/aoSpecOccSimple.frag.js 0 9
./graphics/program-lib/chunks/lit/combineDiffuseSpecular.frag.js 0 5
./graphics/program-lib/chunks/lit/combineDiffuse.frag.js 0 5
./graphics/program-lib/chunks/lit/lightSpecularAnisoGGX.frag.js 0 44
./graphics/program-lib/chunks/lit/reflectionCube.frag.js 0 14
./graphics/program-lib/chunks/lit/baseNineSliced.frag.js 0 12
./graphics/program-lib/chunks/lit/fogExp.frag.js 0 12
./graphics/program-lib/chunks/lit/baseNineSliced.vert.js 0 10
./graphics/program-lib/chunks/lit/uv1.vert.js 0 5
./graphics/program-lib/chunks/lit/clusteredLight.frag.js 0 599
./graphics/program-lib/chunks/lit/shadowVSM_common.frag.js 0 37
./graphics/program-lib/chunks/lit/TBNderivative.frag.js 0 25
./graphics/program-lib/chunks/lit/fresnelSchlick.frag.js 0 20
./graphics/program-lib/chunks/lit/instancing.vert.js 0 6
./graphics/program-lib/chunks/lit/uv0.vert.js 0 24
./graphics/program-lib/chunks/lit/shadowStandardGL2.frag.js 0 69
./graphics/program-lib/chunks/lit/shadowEVSMn.frag.js 0 23
./graphics/program-lib/chunks/lit/fogNone.frag.js 0 7
./graphics/program-lib/chunks/lit/falloffInvSquared.frag.js 0 18
./graphics/program-lib/chunks/lit/biasConst.frag.js 0 7
./graphics/program-lib/chunks/lit/combineDiffuseSpecularOld.frag.js 0 5
./graphics/program-lib/chunks/lit/base.vert.js 0 16
./graphics/program-lib/chunks/lit/TBNfast.frag.js 0 5
./graphics/program-lib/chunks/lit/lightmapDir.frag.js 0 22
./graphics/program-lib/chunks/lit/base.frag.js 0 17
./graphics/program-lib/chunks/lit/lightSpecularPhong.frag.js 0 18
./graphics/program-lib/chunks/lit/TBN.frag.js 0 5
./graphics/program-lib/chunks/lit/normalSkinned.vert.js 0 6
./graphics/program-lib/chunks/lit/shadowCascades.frag.js 0 54
./graphics/program-lib/chunks/lit/fogExp2.frag.js 0 12
./graphics/program-lib/chunks/lit/blurVSM.frag.js 0 51
./graphics/program-lib/chunks/lit/shadowCoord.frag.js 0 42
./graphics/program-lib/chunks/lit/cubeMapProjectNone.frag.js 0 5
./graphics/program-lib/chunks/lit/viewNormal.vert.js 0 10
./graphics/program-lib/chunks/lit/combineDiffuseSpecularNoConserve.frag.js 0 5
./graphics/program-lib/chunks/lit/shadowCommon.frag.js 0 8
./graphics/program-lib/chunks/lit/TBNObjectSpace.frag.js 0 30
./graphics/program-lib/chunks/lit/reflectionSphere.frag.js 0 21
./graphics/program-lib/chunks/lit/storeEVSM.frag.js 0 7
./graphics/program-lib/chunks/lit/combineClearCoat.frag.js 0 5
./graphics/program-lib/chunks/lit/outputAlpha.frag.js 0 3
./graphics/program-lib/chunks/lit/cookie.frag.js 0 36
./graphics/program-lib/chunks/lit/lightSpecularBlinn.frag.js 0 23
./graphics/program-lib/chunks/lit/baseNineSlicedTiled.frag.js 0 13
./graphics/program-lib/chunks/lit/start.vert.js 0 4
./graphics/program-lib/chunks/lit/specularAaToksvig.frag.js 0 7
./graphics/program-lib/chunks/lit/normal.vert.js 0 41
./graphics/program-lib/chunks/lit/start.frag.js 0 12
./graphics/program-lib/chunks/lit/combineDiffuseSpecularNoReflSeparateAmbient.frag.js 0 7
./graphics/program-lib/chunks/lit/float-unpacking.frag.js 0 33
./graphics/program-lib/chunks/lit/clusteredLightCookies.frag.js 0 18
./graphics/program-lib/chunks/lit/startNineSliced.frag.js 0 5
./graphics/program-lib/chunks/lit/refraction.frag.js 0 24
./graphics/program-lib/chunks/lit/outputAlphaPremul.frag.js 0 4
./graphics/program-lib/chunks/lit/ltc.frag.js 0 443
./graphics/program-lib/chunks/lit/shadowVSM8.frag.js 0 26
./graphics/program-lib/chunks/lit/ambientConstant.frag.js 0 5
./graphics/program-lib/chunks/lit/cubeMapRotate.frag.js 0 13
./graphics/program-lib/chunks/lit/extension.vert.js 0 2
./graphics/program-lib/chunks/lit/shadowEVSM.frag.js 0 14
./graphics/program-lib/chunks/lit/extension.frag.js 0 2
./graphics/program-lib/chunks/lit/lightDirPoint.frag.js 0 7
./graphics/program-lib/chunks/lit/clusteredLightShadows.frag.js 0 157
./graphics/program-lib/chunks/lit/aoDiffuseOcc.frag.js 0 5
./graphics/program-lib/chunks/lit/combineDiffuseSpecularNoRefl.frag.js 0 5
./graphics/program-lib/chunks/lit/ambientEnv.frag.js 0 15
./graphics/program-lib/chunks/lit/aoSpecOccConstSimple.frag.js 0 6
./graphics/program-lib/chunks/lit/specularAaToksvigFast.frag.js 0 7
./graphics/program-lib/chunks/lit/startNineSlicedTiled.frag.js 0 10
./graphics/program-lib/chunks/lit/shadowStandard.frag.js 0 184
./graphics/program-lib/chunks/lit/lightmapSingleVert.frag.js 0 5
./graphics/program-lib/chunks/reproject.frag.js 0 349
./graphics/program-lib/chunks/tonemappingAces2.frag.js 0 39
./graphics/program-lib/chunks/envMultiply.frag.js 0 7
./graphics/program-lib/chunks/packDepth.frag.js 0 13
./graphics/program-lib/chunks/skinBatchConst.vert.js 0 20
./graphics/program-lib/chunks/gles3.vert.js 0 7
./graphics/program-lib/chunks/gles3.frag.js 0 16
./graphics/program-lib/chunks/msdf.frag.js 0 76
./graphics/program-lib/chunks/standard/diffuse.frag.js 0 25
./graphics/program-lib/chunks/standard/normalDetailMap.frag.js 0 23
./graphics/program-lib/chunks/standard/clearCoatNormal.frag.js 0 18
./graphics/program-lib/chunks/standard/metalness.frag.js 0 33
./graphics/program-lib/chunks/standard/diffuseDetailMap.frag.js 0 14
./graphics/program-lib/chunks/standard/specular.frag.js 0 25
./graphics/program-lib/chunks/standard/clearCoat.frag.js 0 25
./graphics/program-lib/chunks/standard/parallax.frag.js 0 15
./graphics/program-lib/chunks/standard/normalXYZ.frag.js 0 5
./graphics/program-lib/chunks/standard/normalMap.frag.js 0 11
./graphics/program-lib/chunks/standard/detailModes.frag.js 0 27
./graphics/program-lib/chunks/standard/opacity.frag.js 0 25
./graphics/program-lib/chunks/standard/alphaTest.frag.js 0 7
./graphics/program-lib/chunks/standard/emissive.frag.js 0 35
./graphics/program-lib/chunks/standard/normalXY.frag.js 0 8
./graphics/program-lib/chunks/standard/clearCoatGloss.frag.js 0 27
./graphics/program-lib/chunks/standard/normalMapFast.frag.js 0 9
./graphics/program-lib/chunks/standard/gloss.frag.js 0 27
./graphics/program-lib/chunks/standard/ao.frag.js 0 17
./graphics/program-lib/chunks/lightmapper/bilateralDeNoise.frag.js 0 96
./graphics/program-lib/chunks/lightmapper/bakeDirLmEnd.frag.js 0 18
./graphics/program-lib/chunks/lightmapper/dilate.frag.js 0 21
./graphics/program-lib/chunks/lightmapper/bakeLmEnd.frag.js 0 8
./graphics/program-lib/chunks/rgbm.frag.js 0 13
./graphics/program-lib/chunks/outputTex2D.frag.js 0 9
./graphics/program-lib/chunks/precisionTest2.frag.js 0 18
./graphics/program-lib/chunks/fullscreenQuad.frag.js 0 9
./graphics/program-lib/chunks/tonemappingLinear.frag.js 0 7
./graphics/program-lib/chunks/fullscreenQuad.vert.js 0 11
./graphics/program-lib/chunks/chunks.js 0 396
./graphics/program-lib/chunks/skinTex.vert.js 0 53
./graphics/program-lib/chunks/transform.vert.js 0 123
./graphics/program-lib/chunks/gamma2_2.frag.js 0 40
./graphics/program-lib/chunks/decode.frag.js 0 57
./graphics/program-lib/chunks/tonemappingNone.frag.js 0 5
./graphics/program-lib/chunks/screenDepth.frag.js 0 55
./graphics/program-lib/chunks/skinConst.vert.js 0 44
./graphics/program-lib/chunks/skybox/skyboxEnv.frag.js 0 15
./graphics/program-lib/chunks/skybox/skybox.vert.js 0 27
./graphics/program-lib/chunks/skybox/skyboxHDR.frag.js 0 14
./graphics/program-lib/chunks/tonemappingHejl.frag.js 0 12
./graphics/program-lib/chunks/fixCubemapSeamsNone.frag.js 0 21
./graphics/program-lib/chunks/particle/particle_end.frag.js 0 7
./graphics/program-lib/chunks/particle/particle_wrap.vert.js 0 7
./graphics/program-lib/chunks/particle/particle_end.vert.js 0 10
./graphics/program-lib/chunks/particle/particleAnimFrameLoop.vert.js 0 3
./graphics/program-lib/chunks/particle/particle_customFace.vert.js 0 4
./graphics/program-lib/chunks/particle/particle_lambert.frag.js 0 4
./graphics/program-lib/chunks/particle/particle_cpu_end.vert.js 0 6
./graphics/program-lib/chunks/particle/particle_blendMultiply.frag.js 0 4
./graphics/program-lib/chunks/particle/particleUpdaterRespawn.frag.js 0 7
./graphics/program-lib/chunks/particle/particle_stretch.vert.js 0 11
./graphics/program-lib/chunks/particle/particleUpdaterAABB.frag.js 0 27
./graphics/program-lib/chunks/particle/particle_billboard.vert.js 0 4
./graphics/program-lib/chunks/particle/particleUpdaterOnStop.frag.js 0 3
./graphics/program-lib/chunks/particle/particleUpdaterStart.frag.js 0 84
./graphics/program-lib/chunks/particle/particle_blendAdd.frag.js 0 5
./graphics/program-lib/chunks/particle/particleUpdaterInit.frag.js 0 33
./graphics/program-lib/chunks/particle/particle_mesh.vert.js 0 7
./graphics/program-lib/chunks/particle/particleAnimFrameClamp.vert.js 0 3
./graphics/program-lib/chunks/particle/particle_TBN.vert.js 0 4
./graphics/program-lib/chunks/particle/particleInputFloat.frag.js 0 12
./graphics/program-lib/chunks/particle/particle_blendNormal.frag.js 0 3
./graphics/program-lib/chunks/particle/particle_halflambert.frag.js 0 6
./graphics/program-lib/chunks/particle/particle_lighting.frag.js 0 7
./graphics/program-lib/chunks/particle/particleInputRgba8.frag.js 0 42
./graphics/program-lib/chunks/particle/particle_soft.vert.js 0 3
./graphics/program-lib/chunks/particle/particle_pointAlong.vert.js 0 4
./graphics/program-lib/chunks/particle/particle_soft.frag.js 0 6
./graphics/program-lib/chunks/particle/particleAnimTex.vert.js 0 16
./graphics/program-lib/chunks/particle/particle_cpu.vert.js 0 89
./graphics/program-lib/chunks/particle/particleUpdaterEnd.frag.js 0 4
./graphics/program-lib/chunks/particle/particle_localShift.vert.js 0 3
./graphics/program-lib/chunks/particle/particle_init.vert.js 0 41
./graphics/program-lib/chunks/particle/particle_normal.vert.js 0 3
./graphics/program-lib/chunks/particle/particleOutputFloat.frag.js 0 9
./graphics/program-lib/chunks/particle/particleUpdaterNoRespawn.frag.js 0 6
./graphics/program-lib/chunks/particle/particle_normalMap.frag.js 0 4
./graphics/program-lib/chunks/particle/particle.vert.js 0 98
./graphics/program-lib/chunks/particle/particleUpdaterSphere.frag.js 0 19
./graphics/program-lib/chunks/particle/particle.frag.js 0 39
./graphics/program-lib/chunks/particle/particleOutputRgba8.frag.js 0 39
./graphics/program-lib/chunks/transformDecl.vert.js 0 9
./graphics/program-lib/chunks/tonemappingAces.frag.js 0 13
./graphics/program-lib/chunks/fixCubemapSeamsStretch.frag.js 0 43
./graphics/program-lib/chunks/envConst.frag.js 0 5
./graphics/program-lib/programs/standard.js 0 1771
./graphics/program-lib/programs/skybox.js 54 0
./graphics/program-lib/programs/common.js 0 78
./graphics/program-lib/programs/basic.js 168 0
./graphics/program-lib/programs/particle.js 130 0
./graphics/program-lib/utils.js 0 125
./graphics/render-target.js 0 301
./graphics/device-cache.js 0 48
./graphics/texture.js 0 1073
./i18n/constants.js 0 19
./i18n/utils.js 0 209
./i18n/i18n.js 0 444
./i18n/i18n-parser.js 0 47
./sound/instance3d.js 0 276
./sound/instance.js 0 1135
./sound/sound.js 50 0
./sound/listener.js 136 0
./sound/manager.js 309 0
./polyfill/typedarray-fill.js 0 17
./polyfill/array-find.js 0 42
./polyfill/defineProtoFunc.js 0 18
./polyfill/math-log2.js 0 4
./polyfill/math-sign.js 0 19
./polyfill/pointer-lock.js 0 60
./polyfill/object-assign.js 0 30
./polyfill/string.js 0 28
./polyfill/request-animation-frame.js 0 32
./polyfill/OESVertexArrayObject.js 0 318
./polyfill/array-find-index.js 0 42
./polyfill/array-fill.js 0 37
./polyfill/number-isfinite.js 0 4
./bundles/bundle.js 0 56
./bundles/bundle-registry.js 0 357
./deprecated/deprecated.js 0 1337

@LeXXik
Copy link
Contributor

LeXXik commented May 11, 2022

I am curious in how this would remove ambiguity for future contributors using different operating systems?

@liamdon
Copy link
Contributor Author

liamdon commented May 11, 2022

  • Let's say I have a PR for the math classes, and I'm making changes to ./math/vec2.js (stored in git as CRLF) and ./math/mat4.js (stored in git as LF).
  • Should my PR convert mat4.js to CRLF, or vec2.js to LF?
  • Probably not, because if I do that, the diff will show the entire file as replaced and my actual changes will be invisible.
  • For PR readability, I should probably commit with the existing EOL scheme for each file
  • This is hard to manage for both Windows and Unix users - the editor might change the line endings without you noticing, so there's always a risk of unreadable diffs

Luckily, git has a solution for this!

We should pair the above changes with a .gitattributes file committed to the repo that specifies how endings are normalized before being committed (read more here). I've now opened a PR here.

This allows developers to use their native EOL format while working with local files, but when those files are checked in they will be normalized to LF, which is what git prefers and what Github recommends.

Again, the big advantage here is that it improves how diffs and merges appear, and eliminates confusion over whether a given PR should be converting the files it touches to one ending or the other.

Because the repo hasn't been using .gitattributes so far, 5% of files are stored in an inconsistent format. We would first normalized those in repo storage via the above change, and then .gitattributes will allow Windows users to use CRLF (or LF if they want to) while transparently normalizing to LF on commit.

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

Successfully merging a pull request may close this issue.

2 participants