-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: use shared html resource and add checks to keep resources in sync #258
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
82cf1b4
use shared html resource and add checks to keep resources in sync
andrewrobinsonhodges-snyk be936fb
switch to sha512sum for file hashing in resource checks
andrewrobinsonhodges-snyk fa3717f
switch to sha512sum for file hashing in resource checks
andrewrobinsonhodges-snyk abfe66a
Merge branch 'main' into feat/static-resource-checks
andrewrobinsonhodges-snyk cfb502d
fix: calculate html font size from Eclipse defaults
andrewrobinsonhodges-snyk 459d05b
fix: whitespace
andrewrobinsonhodges-snyk d183695
fix: remove unused import
andrewrobinsonhodges-snyk 2d15d02
fix: fall back to default font registry if workspace is not available
andrewrobinsonhodges-snyk c2fa611
fix: fall back to default font size if workspace is not available
andrewrobinsonhodges-snyk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Static Resource Checking | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
|
||
jobs: | ||
static-resource-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check Static Resources | ||
run: | | ||
declare -A resources | ||
# Add each resource as a key, value pair, mapping the local resource to the reference file (which should be stored in the lanaguage server repository). For example: | ||
# resources["<path_to_local_file>"]="<url_of_reference_file>" | ||
resources["plugin/src/main/resources/ui/html/ScanSummaryInit.html"]="https://raw.githubusercontent.com/snyk/snyk-ls/refs/heads/main/shared_ide_resources/ui/html/ScanSummaryInit.html" | ||
for key in ${!resources[@]}; do | ||
candidate=$(sha512sum $key | awk {'print $1'}) | ||
candidate=${candidate:="null"} | ||
reference=$(curl -s ${resources[$key]} | sha512sum | awk {'print $1'}) | ||
echo "Candidate file $key has sha512sum $candidate" | ||
echo "Reference file ${resources[$key]} has sha512sum $reference" | ||
[[ $candidate == $reference ]] | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Check warning
Code scanning / PMD
No need to call String.valueOf to append to a string. Warning