Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Improve
ShaderLab
compilation error log and package build #2364Improve
ShaderLab
compilation error log and package build #2364Changes from 110 commits
5a26f3d
5ecc318
cafc24f
dc69489
221b7b6
0d45d9c
0f14c3f
8871d9b
3b4ffd7
f649a58
598fc56
e33a66f
41ef06f
b5214fc
f36ce02
ff8b7c2
634236f
91e6fa4
3932448
671cace
92b972e
9226d38
ff6a69a
83b9ca2
f510c2a
94e30f5
e3c7aa5
36b77e0
b2e07fc
93df92e
8e0cc28
7652250
c92e674
3fefbe9
9eb7398
9f5b5bc
82f73b2
964b846
f6fed8b
519ab40
ee6a813
d7e0ac8
8f75c28
00447fb
d5a3c0c
c176226
b8ca43f
a6d21d6
ce23026
3bcaeb0
79a7a0c
fa7131c
3093bd2
6eba20a
8c90796
dab8003
f12b8f7
c32969b
9d4d808
f5edeb3
68e1556
dd4777c
1a918da
4c9e16c
e4d267c
077e009
462af90
54f9c79
d01b060
df84ce0
1426499
48eb236
3b06a3f
ab356b6
ab6de2c
5092aab
8a5f838
ff3f5ae
c679a9e
44b7e84
eb0bcde
2f56705
b102ac8
e1f749a
6e36dd0
032a631
adb871f
cc8e0a1
b7da54e
59776c4
11ebcbc
67f9c8d
c76c81f
2236ac3
9f8cbe7
0df3db6
a72aade
a19e9ba
4c47c15
d83cb29
a180d29
7c57e15
4c63401
87c719d
2661cae
a85ee45
4c50206
cae81c2
eb515be
fb3974e
f0742cf
ef6496b
4197f1d
2e343bb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
Check warning on line 23 in packages/shader-lab/src/GSError.ts
Codecov / codecov/patch
packages/shader-lab/src/GSError.ts#L23
Check warning on line 27 in packages/shader-lab/src/GSError.ts
Codecov / codecov/patch
packages/shader-lab/src/GSError.ts#L27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Test Coverage Missing for
toString
Method ScenariosThe
toString
method inGSError.ts
lacks test coverage for the following scenarios:source
is falsy.location
is an instance ofShaderPosition
.Please add test cases to cover these scenarios to ensure consistent return types and comprehensive validation.
🔗 Analysis chain
Ensure consistent return type and improve test coverage.
The
toString
method handles different location types well. However, there are two points to consider:source
is falsy might lead to inconsistent return types. Consider modifying it to always return a string:source
is falsylocation
is an instance ofShaderPosition
To verify the test coverage, you can run the following command:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 185777
🧰 Tools
🪛 GitHub Check: codecov/patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache
lines[i]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add bounds checking to prevent potential runtime errors.
The error message formatting logic is comprehensive and provides clear visual indication of the error location. However, there's a potential issue with accessing
lines[i]
without bounds checking, which could lead to runtime errors ifi
is out of bounds.To prevent potential runtime errors, add bounds checking before accessing
lines[i]
:This change ensures that we only access valid indices of the
lines
array, preventing potential runtime errors.📝 Committable suggestion
Check warning on line 72 in packages/shader-lab/src/ShaderLab.ts
Codecov / codecov/patch
packages/shader-lab/src/ShaderLab.ts#L71-L72
Check warning on line 75 in packages/shader-lab/src/ShaderLab.ts
Codecov / codecov/patch
packages/shader-lab/src/ShaderLab.ts#L74-L75
Check warning on line 94 in packages/shader-lab/src/ShaderLab.ts
Codecov / codecov/patch
packages/shader-lab/src/ShaderLab.ts#L94
Check warning on line 125 in packages/shader-lab/src/ShaderLab.ts
Codecov / codecov/patch
packages/shader-lab/src/ShaderLab.ts#L125
Check warning on line 141 in packages/shader-lab/src/ShaderLab.ts
Codecov / codecov/patch
packages/shader-lab/src/ShaderLab.ts#L139-L141