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

#1065: Add SHA-256 checksum generator to url-updater #1089

Closed

Conversation

alfeilex
Copy link
Member

No description provided.

Amueller36 and others added 26 commits January 23, 2023 14:53
Because the status json handling that was done before seemed wrong I refactored the corresponding methods/classes.
…009-Create-crawler-Create-1008-create-URL-checker
Updated Pom.xml
…irrors-1009-Create-crawler-Create-1008-create-URL-checker
…awler-Create-1008-create-URL-checker' of https://github.com/Amueller36/ide into feature-941-New-approach-for-ide-mirrors-1009-Create-crawler-Create-1008-create-URL-checker
…009-Create-crawler-Create-1008-create-URL-checker
…ling/UrlVersion.java

Co-authored-by: sonatype-lift[bot] <37194012+sonatype-lift[bot]@users.noreply.github.com>
Refactored UpdateManager
Fixxed problem with HelmCrawler, which caused no versions to be found.
Fixxed MavenCrawler not creating status.json files.
Rancher now is part of the folder docker.
Added support For Kotlin due to ticket devonfw#1039
Refactored UpdateManager
Fixxed problem with HelmCrawler, which caused no versions to be found.
Fixxed MavenCrawler not creating status.json files.
Rancher now is part of the folder docker.
Added support For Kotlin due to ticket devonfw#1039
…009-Create-crawler-Create-1008-create-URL-checker
…009-Create-crawler-Create-1008-create-URL-checker
Aligned Kotlin Native Convention with commandlet
…009-Create-crawler-Create-1008-create-URL-checker
…awler-Create-1008-create-URL-checker' of https://github.com/Amueller36/ide into feature-941-New-approach-for-ide-mirrors-1009-Create-crawler-Create-1008-create-URL-checker
@alfeilex alfeilex linked an issue Mar 30, 2023 that may be closed by this pull request
@github-actions github-actions bot added bash related to bash shell or scripts settings ide-settings repo and replated processes and features labels Mar 30, 2023
throw new IllegalStateException("Failed to create checksum " + e);
}

try (BufferedWriter checksumFile = new BufferedWriter(new FileWriter(file + ".sha256"))) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18% of developers fix this issue

DefaultCharset: Implicit use of the platform default charset, which can result in differing behaviour between JVM executions or incorrect behavior if the encoding of the data source doesn't match expectations.


Suggested change
try (BufferedWriter checksumFile = new BufferedWriter(new FileWriter(file + ".sha256"))) {
try (BufferedWriter checksumFile = Files.newBufferedWriter(Paths.get(file + ".sha256"), Charset.defaultCharset())) {

ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]


/**
* @param inputStream the input stream of requested url
* @return
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10% of developers fix this issue

EmptyBlockTag: A block tag (@param, @return, @throws, @deprecated) has an empty description. Block tags without descriptions don't add much value for future readers of the code; consider removing the tag entirely or adding a description.


Suggested change
* @return
*

ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

* start the generator to create checksums of .urls files
* @param files iterate over files to find .urls files
*/
public void generateChecksums(File[] files) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8% of developers fix this issue

AvoidObjectArrays: Avoid accepting a File[]; consider an Iterable instead


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

throw new IllegalStateException("Failed to create checksum " + e);
}

try (BufferedWriter checksumFile = new BufferedWriter(new FileWriter(file + ".sha256"))) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14% of developers fix this issue

PATH_TRAVERSAL_OUT: This API (java/io/FileWriter.(Ljava/lang/String;)V) writes to a file whose location might be specified by user input


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

return URLStatusSuccess;
}

public void setSuccess(URLStatusSuccess URLStatusSuccess) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12% of developers fix this issue

VariableNameSameAsType: Variable named URLStatusSuccess has the type URLStatusSuccess. Calling methods using "URLStatusSuccess.something" are difficult to distinguish between static and instance methods.

❗❗ 5 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
url-updater/src/main/java/com/devonfw/tools/ide/url/updater/AbstractCrawler.java 159
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/jsonfile/URLStatus.java 22
url-updater/src/main/java/com/devonfw/tools/ide/url/updater/AbstractCrawler.java 132
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/jsonfile/URLStatus.java 4
url-updater/src/main/java/com/devonfw/tools/ide/url/folderhandling/jsonfile/URLStatus.java 5

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@github-actions github-actions bot added the SCM software-configuration-management (github actions, internal processes, git or github utilization) label Mar 30, 2023
@alfeilex alfeilex closed this Apr 3, 2023
@alfeilex alfeilex deleted the checksum-generator-independent branch April 3, 2023 13:39
@hohwille hohwille added this to the rejected milestone Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bash related to bash shell or scripts SCM software-configuration-management (github actions, internal processes, git or github utilization) settings ide-settings repo and replated processes and features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants