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

(chore): Add linter improvements #272

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Sep 23, 2023

Description

This PR improves our linting process by:

  • Update Makefile to improve lint target and add the lint-fix which can fix small issues like format and to sort the imports
  • Add linter check using github action, removing the need to check logs. Example:

Screenshot 2023-09-23 at 15 45 45

##Motivation

  • Make it easier to fix lint issues and do the review
  • Move checks to GitHub actions
  • Ensuring consistent linting behaviour
  • Remove the need to set up lint manually. See that when we run make lint if the bin does not exist the target will download it, see;
$ make check                         
make lint
/Users/camilamacedo/go/src/github.com/foundriesio/fioctl/bin/golangci-lint run
  • Allow leverage in the common checks to avoid errors; see proposed follow-up:

@StealthyCoder
Copy link
Member

@doanac I will leave it to you if you want to move these checks to Github Actions rather than our GavelCI 👍

Copy link
Member

@vkhoroz vkhoroz left a comment

Choose a reason for hiding this comment

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

It think this is the correct direction, and @doanac would probably agree.

But, please, make this in the least intrusive way.

.github/workflows/lint.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
subcommands/keys/ca_show.go Outdated Show resolved Hide resolved
@vkhoroz
Copy link
Member

vkhoroz commented Sep 25, 2023

@camilamacedo86 this is also conflicting with my PR #269.
So, I'd like your changes to be as minimal and the review go as smoothly as possible.

@camilamacedo86
Copy link
Contributor Author

Hi @vkhoroz,

I addressed all suggestions as much as possible.
Regards:

@camilamacedo86 this is also conflicting with my PR #269.
So, I'd like your changes to be as minimal and the review go as smoothly as possible.

Could you please let me know where is the conflict?
The changes in the Makefile are not on the same lines so it seems that will be fine.
Please, let me know if I missed something.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
subcommands/keys/ca_show.go Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the linter-enhancement branch 6 times, most recently from 2bc068a to 538f81a Compare September 27, 2023 11:06
@camilamacedo86 camilamacedo86 changed the title (Linter Enhancements): use specific version and check with github actions (chore): Add linter improvements Sep 27, 2023
Makefile Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the linter-enhancement branch 2 times, most recently from 404057f to d4774e2 Compare September 27, 2023 12:22
Copy link
Member

@vkhoroz vkhoroz left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Camila Macedo <camila.macedo@foundries.io>
@vkhoroz vkhoroz merged commit 0f7de71 into foundriesio:main Sep 28, 2023
1 check passed
@camilamacedo86 camilamacedo86 deleted the linter-enhancement branch September 28, 2023 12:52
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.

3 participants