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

refactor: move finding table printing to CLI #2960

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

phillebaba
Copy link
Member

Description

This change moves printing of the findings table from linting to the CLI rather than in the pkg code.

Related Issue

Relates to #2576

Checklist before merging

@phillebaba phillebaba requested review from a team as code owners September 3, 2024 12:15
Copy link

netlify bot commented Sep 3, 2024

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 37ebe1c
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/66d7277efda2620007a90309

@phillebaba
Copy link
Member Author

I have removed the severity filter because I do not think it is being used. When calling lint.ValidatePackageSchema all findings will have the severity error.

Additionally we should start returning an exit code 1 for linter warnings. It should be up to the user to explicitly ignore this if they do not want to.

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 18.84058% with 56 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cmd/common/table.go 0.00% 27 Missing ⚠️
src/cmd/dev.go 0.00% 19 Missing ⚠️
src/cmd/package.go 0.00% 5 Missing ⚠️
src/pkg/lint/lint.go 63.63% 4 Missing ⚠️
src/pkg/lint/findings.go 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/pkg/message/message.go 10.07% <ø> (+0.30%) ⬆️
src/pkg/packager/creator/utils.go 25.00% <100.00%> (+5.00%) ⬆️
src/pkg/lint/findings.go 71.42% <0.00%> (+36.01%) ⬆️
src/pkg/lint/lint.go 45.67% <63.63%> (+5.67%) ⬆️
src/cmd/package.go 0.00% <0.00%> (ø)
src/cmd/dev.go 0.00% <0.00%> (ø)
src/cmd/common/table.go 0.00% <0.00%> (ø)

@phillebaba phillebaba force-pushed the fix/move-finding-table branch 3 times, most recently from cb29862 to 3313708 Compare September 3, 2024 15:06
Signed-off-by: Philip Laine <philip.laine@gmail.com>
Copy link
Contributor

@AustinAbro321 AustinAbro321 left a comment

Choose a reason for hiding this comment

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

Small comment, otherwise looks great

src/cmd/dev.go Show resolved Hide resolved
@phillebaba phillebaba added this pull request to the merge queue Sep 3, 2024
Merged via the queue into main with commit d26817f Sep 3, 2024
26 checks passed
@phillebaba phillebaba deleted the fix/move-finding-table branch September 3, 2024 21:30
mjnagel added a commit to defenseunicorns/uds-core that referenced this pull request Sep 5, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| ghcr.io/zarf-dev/packages/init | minor | `v0.38.3` -> `v0.39.0` |
| [zarf-dev/zarf](https://redirect.github.com/zarf-dev/zarf) | minor |
`v0.38.3` -> `v0.39.0` |

---

### Release Notes

<details>
<summary>zarf-dev/zarf (zarf-dev/zarf)</summary>

###
[`v0.39.0`](https://redirect.github.com/zarf-dev/zarf/releases/tag/v0.39.0)

[Compare
Source](https://redirect.github.com/zarf-dev/zarf/compare/v0.38.3...v0.39.0)

##### What's Changed

- chore: update dos games release by
[@&#8203;AustinAbro321](https://redirect.github.com/AustinAbro321) in
[zarf-dev/zarf#2921
- ci: id-token write application packages by
[@&#8203;AustinAbro321](https://redirect.github.com/AustinAbro321) in
[zarf-dev/zarf#2923
- docs: update dos games example by
[@&#8203;AustinAbro321](https://redirect.github.com/AustinAbro321) in
[zarf-dev/zarf#2924
- chore(deps): bump github/codeql-action from 3.26.4 to 3.26.5 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[zarf-dev/zarf#2927
- chore: schema adr by
[@&#8203;AustinAbro321](https://redirect.github.com/AustinAbro321) in
[zarf-dev/zarf#2600
- fix: remove use of pkg/errors by
[@&#8203;phillebaba](https://redirect.github.com/phillebaba) in
[zarf-dev/zarf#2937
- refactor: remove use of named returns in packager by
[@&#8203;phillebaba](https://redirect.github.com/phillebaba) in
[zarf-dev/zarf#2940
- chore(deps): bump github/codeql-action from 3.26.5 to 3.26.6 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[zarf-dev/zarf#2948
- refactor: remove printing available Helm charts and versions when the
Chart is not found by
[@&#8203;phillebaba](https://redirect.github.com/phillebaba) in
[zarf-dev/zarf#2944
- refactor: remove connect strings from packager property by
[@&#8203;phillebaba](https://redirect.github.com/phillebaba) in
[zarf-dev/zarf#2941
- fix(ci): test-imports workflow breaks when called from a fork by
[@&#8203;AustinAbro321](https://redirect.github.com/AustinAbro321) in
[zarf-dev/zarf#2946
- feat: add health checks by
[@&#8203;phillebaba](https://redirect.github.com/phillebaba) in
[zarf-dev/zarf#2678
- refactor: move finding table printing to CLI by
[@&#8203;phillebaba](https://redirect.github.com/phillebaba) in
[zarf-dev/zarf#2960
- docs: update docs item in update Q2 roadmap by
[@&#8203;eknowles](https://redirect.github.com/eknowles) in
[zarf-dev/zarf#2958
- chore(deps): bump actions/upload-artifact from 4.3.6 to 4.4.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[zarf-dev/zarf#2957
- fix: progress bar image name flashes on push by
[@&#8203;AustinAbro321](https://redirect.github.com/AustinAbro321) in
[zarf-dev/zarf#2965

##### New Contributors

- [@&#8203;eknowles](https://redirect.github.com/eknowles) made their
first contribution in
[zarf-dev/zarf#2958

**Full Changelog**:
zarf-dev/zarf@v0.38.3...v0.39.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/defenseunicorns/uds-core).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
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