8000 Included tests for scorer/config by nathannaveen · Pull Request #247 · ossf/criticality_score · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Included tests for scorer/config #247

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

Merged
merged 7 commits into from
Nov 23, 2022

Conversation

nathannaveen
Copy link
Contributor
  • Included tests for ToAlgorithmInput(), LoadConfig(), and some for buildCondition()
  • Couldn't test other functions because they returned functions, and they couldn't be compared.

- Included tests for ToAlgorithmInput(), LoadConfig(), and some for buildCondition()
- Couldn't test other functions because they returned functions, and they couldn't be compared.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
@nathannaveen nathannaveen force-pushed the nathan/feat/scorer-unittest branch from 121b851 to 068fb02 Compare November 21, 2022 15:17
Copy link
Contributor
@calebbrown calebbrown left a comment

Choose a reason for hiding this comment

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

Hi Nathan,

Thank you for your contribution to this project! Tests are invaluable and I appreciate the effort you have put in to adding these.

I've added a few minor comments, but overall the change looks good.

Caleb

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Copy link
Contributor
@calebbrown calebbrown 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 changes!

Copy link
Contributor
@calebbrown calebbrown left a comment

Choose a reason for hiding this comment

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

Sorry, I didn't check the lint!

The issues are marked inline.

"GCI" issues can be fixed by putting the "cmp" import on a separate line above the "algorithm" import:

import (
  //...

  "github.com/google/go-cmp/cmp"

  "github.com/ossf/criticality_score/internal/scorer/algorithm"
)

The "fieldalignment" issues are not critical in tests and can be ignore by adding //nolint:govet above the struct.

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
@nathannaveen nathannaveen force-pushed the nathan/feat/scorer-unittest branch from f304536 to 88fcd22 Compare November 22, 2022 23:38
Copy link
Contributor
@calebbrown calebbrown left a comment

Choose a reason for hiding this comment

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

Hi, there are still some missing lint fixes. You can run the lint check yourself by calling make lint.

Also, it would be helpful if your version of go.work.sum didn't conflict with upstream.

Thanks!

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
@nathannaveen
Copy link
Contributor Author

Hi, there are still some missing lint fixes. You can run the lint check yourself by calling make lint.

Also, it would be helpful if your version of go.work.sum didn't conflict with upstream.

Thanks!

Appreciate the feedback and the patience :)

Copy link
Contributor
@calebbrown calebbrown 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 working through the changes!

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 this pull request may close these issues.

2 participants
0