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

fix(formatOutput): fix spacing between tables #269

Merged
merged 4 commits into from
May 19, 2024

Conversation

pbr0ck3r
Copy link
Contributor

@pbr0ck3r pbr0ck3r commented May 18, 2024

Please read CONTRIBUTING.md for additional information on contributing to this repository!

What this PR does / why we need it

PR Checklist

  • This PR adds K8s exceptions (false positives)
  • This PR adds new code
  • This PR includes test for any new code

Github Issue

[XX-XX]

Notes for your reviewers

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 40.87%. Comparing base (6a391d3) to head (b4d8e48).
Report is 4 commits behind head on main.

Files Patch % Lines
pkg/kor/kor.go 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
+ Coverage   40.83%   40.87%   +0.04%     
==========================================
  Files          58       58              
  Lines        2902     2899       -3     
==========================================
  Hits         1185     1185              
+ Misses       1531     1528       -3     
  Partials      186      186              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

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

Not sure I was clear with the issue.

I want the output like this

Unused Serviceaccounts in Namespace: default
+---+---------------------+
| # |    RESOURCE NAME    |
+---+---------------------+
| 1 | my-service-account  |
| 2 | my-service-account2 |
+---+---------------------+

Unused Serviceaccounts in Namespace: test
+---+---------------------+
| # |    RESOURCE NAME    |
+---+---------------------+
| 1 | my-service-account2 |
+---+---------------------+

With the space between each namespace

pkg/kor/kor.go Outdated Show resolved Hide resolved
pkg/kor/kor.go Outdated Show resolved Hide resolved
Phil Brocker added 2 commits May 19, 2024 10:07
@pbr0ck3r pbr0ck3r requested a review from yonahd May 19, 2024 14:18
Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

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

LGTM

@yonahd yonahd merged commit d96d172 into yonahd:main May 19, 2024
1 check passed
yonahd pushed a commit that referenced this pull request Jun 10, 2024
* fix(formatOutput): fix spacing between tables (#269)

* fix(formatOutput): fix spacing between tables

* fix

* refactor

* refactor

---------

Co-authored-by: Phil Brocker <phil.brocker@gmail.com>

* feat: added file sorting to makefile

* fix: sorted exception files

* feat: converted script in actions to make command

* fix: better way to find unsorted files using makefile

* fix: reverted back to bash

* fix: added help print

* fix: sorted via sort-exception-files

* fix: using vars

* fix: typo

* fix: removed bin

---------

Co-authored-by: Phil Brocker <5331286+pbr0ck3r@users.noreply.github.com>
Co-authored-by: Phil Brocker <phil.brocker@gmail.com>
yonahd pushed a commit that referenced this pull request Jun 15, 2024
* fix(formatOutput): fix spacing between tables (#269)

* fix(formatOutput): fix spacing between tables

* fix

* refactor

* refactor

---------

Co-authored-by: Phil Brocker <phil.brocker@gmail.com>

* feat: added regex support

* feat: updated exceptions to regex

* fix: converted all existing exceptions to be regex compatible

* fix: added support for configmaps and serviceaccounts

* fix: Configmaps and serviceaccounts are now filtered using the same methods

* fix: exceptiontype

* fix: once again wrong file

* feat: add K3S exceptions (#270)

* feat: added clusterroles

* feat: added k3s configmaps

* feat: added k3s crds

* feat: added k3s secrets

* feat: added k3s StorageClass

* feat: added job resource exceptions

* feat: added job exceptions

* fix: importing embed

* fix: fixed sa test

* fix: regex-ified job exceptions

* fix: fixed resource exception for jobs

* fix: removed kube-root-ca from test

* fix: removed default from TestRetrieveUsedSA

* fix: added regex flag to jsons

* added MatchRegex flag

* sorted all exceptoins

* fix: wrong regex expressions

* feat: added resource exception test

* fix: removed binary

---------

Co-authored-by: Phil Brocker <5331286+pbr0ck3r@users.noreply.github.com>
Co-authored-by: Phil Brocker <phil.brocker@gmail.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.

None yet

3 participants