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

ci: adds linting and formatting jobs to on pull request workflow #93

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

ctran88
Copy link
Contributor

@ctran88 ctran88 commented Oct 28, 2024

What's New?

  • updates checkout and setup-go actions
  • updates on pull request ci
    • adds golangci-lint check
    • adds format check
  • adds new workflow to lint pr title
    • only runs when pr is edited
    • it will leave a comment on the PR when title change is required; deletes the comment when it passes
  • addresses linter errors (missing error checks)

Screenshots (if appropriate):

failing PR title check
image

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have manually tested my code thoroughly
  • I have added/updated inline documentation for public facing interfaces if relevant
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing integration and unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional context

Copy link

sonarcloud bot commented Oct 28, 2024

@ctran88 ctran88 changed the title ci: adds linting and formatting jobs to on pull request workflow foo: adds linting and formatting jobs to on pull request workflow Oct 28, 2024
@ctran88 ctran88 changed the title foo: adds linting and formatting jobs to on pull request workflow fi: adds linting and formatting jobs to on pull request workflow Oct 28, 2024
@ctran88 ctran88 changed the title fi: adds linting and formatting jobs to on pull request workflow ci: adds linting and formatting jobs to on pull request workflow Oct 28, 2024
@ctran88 ctran88 marked this pull request as ready for review October 28, 2024 16:41
@ctran88 ctran88 requested a review from a team October 28, 2024 16:41
- name: Format
run: |
if [[ $(gofmt -s -d .) ]]; then
echo "Run 'gofmt -s -w .' to format code."
Copy link
Contributor Author

Choose a reason for hiding this comment

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

considered posting a PR comment for this and the linter failure results as a convenience for contributors, but didn't want to overcomplicate the workflow

@ctran88 ctran88 merged commit 93328d1 into main Oct 29, 2024
12 of 15 checks passed
@ctran88 ctran88 deleted the PSG-5112-add-linting-to-ci branch October 29, 2024 16:34
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