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

Clearer warnings in license review #9134

Merged
merged 18 commits into from
Feb 27, 2024

Conversation

radeusgd
Copy link
Member

Pull Request Description

  • Closes Distinguish errors from warnings in license review tool #9120
  • Reorders CI steps to do the license check last (to avoid it preventing tests from running which are more important than the license check)
  • Tries to reword the warnings to be clearer
  • Adds some CSS to the report to more clearly indicate which elements can be clicked.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@radeusgd radeusgd added the CI: No changelog needed Do not require a changelog entry for this PR. label Feb 22, 2024
@radeusgd radeusgd self-assigned this Feb 22, 2024
Copy link
Member

@Akirathan Akirathan left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements. The error messages as well as few style changes look neat.

Copy link
Contributor

@mwu-tow mwu-tow left a comment

Choose a reason for hiding this comment

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

(approving Rust parts)

Copy link
Contributor

@hubertp hubertp left a comment

Choose a reason for hiding this comment

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

Nit picks regarding the naming. I find the notice and problem a bit ambiguous. warning and error are less confusing.

project/GatherLicenses.scala Outdated Show resolved Hide resolved
project/GatherLicenses.scala Outdated Show resolved Hide resolved
project/GatherLicenses.scala Outdated Show resolved Hide resolved
project/src/main/scala/licenses/DependencySummary.scala Outdated Show resolved Hide resolved
Comment on lines 179 to 181
s"A license file was discovered in $name that is different " +
s"from the default license file that is associated with its " +
s"license ${dep.information.license.name}, but a custom license was not expected. If this custom license should override the default one, create a `custom-license` config file. If both files are expected to be included, create an empty `default-and-custom-license` file."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
s"A license file was discovered in $name that is different " +
s"from the default license file that is associated with its " +
s"license ${dep.information.license.name}, but a custom license was not expected. If this custom license should override the default one, create a `custom-license` config file. If both files are expected to be included, create an empty `default-and-custom-license` file."
s"""|A license file was discovered in $name that is different
|from the default license file that is associated with its
|license ${dep.information.license.name}, but a custom license was not expected. If this custom license should override the default one, create a `custom-license` config file. If both files are expected to be included, create an empty `default-and-custom-license` file.""".stripMargin

Copy link
Member Author

Choose a reason for hiding this comment

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

This will add newlines into the string, whereas before the string was a single line.

project/src/main/scala/licenses/report/Report.scala Outdated Show resolved Hide resolved
project/src/main/scala/licenses/report/Report.scala Outdated Show resolved Hide resolved
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

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

I don't feel as a suitable reviewer.

s"No files or copyright information are included for $name."
diagnostics.append(
Diagnostic.Problem(
s"No files or copyright information are included for $name. Generally every dependency should have _some_ copyright info, so this suggests all our heuristics failed. Please find the information manually and add it using `files-add` or `copyright-add`. Even if the dependency is public domain, it may be good to include some information about its source."
Copy link
Member

Choose a reason for hiding this comment

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

+1

@radeusgd
Copy link
Member Author

Nit picks regarding the naming. I find the notice and problem a bit ambiguous. warning and error are less confusing.

Thanks @hubertp for the suggestions, I've applied them.

@radeusgd radeusgd added the CI: Ready to merge This PR is eligible for automatic merge label Feb 27, 2024
@mergify mergify bot merged commit 47c6416 into develop Feb 27, 2024
27 of 29 checks passed
@mergify mergify bot deleted the wip/radeusgd/9120-better-warnings-in-license-review branch February 27, 2024 16:32
@Akirathan Akirathan mentioned this pull request Feb 29, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Distinguish errors from warnings in license review tool
6 participants