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: code format #72

Merged
merged 8 commits into from
Jan 14, 2025
Merged

chore: code format #72

merged 8 commits into from
Jan 14, 2025

Conversation

luohoufu
Copy link
Contributor

@luohoufu luohoufu commented Jan 10, 2025

What does this PR do

code format and lint

Rationale for this change

This pull request focuses on restructuring and enhancing the GitHub Actions workflows, along with some minor code cleanups. The most significant changes include the addition of a new workflow file for unit tests and the removal of an old workflow file, as well as some minor formatting adjustments in various Go files.

GitHub Actions Workflow Enhancements:

  • Added a new workflow file .github/workflows/pr_check.yml to handle unit tests, code formatting checks, and code linting. This workflow includes steps for setting up the Go and Node.js toolchains, caching dependencies, and running the required checks and tests.
  • Removed the old workflow file .github/workflows/unit_test.yml which previously handled unit tests. This file is now obsolete due to the new workflow file.

Code Cleanups:

  • Removed unused constants from config/generated.go, including LastCommitLog, BuildDate, EOLDate, Version, and BuildNumber.
  • Added missing newline characters in several Go files to improve code readability and maintain consistency:
    • model/alerting/condition.go
    • model/alerting/destination.go
    • model/alerting/metric.go
    • model/alerting/resource.go
    • model/alerting/rule.go [1] [2]
    • model/alerting/rule_test.go
    • model/alerting/schedule.go
    • model/insight/field_meta.go

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

@luohoufu luohoufu requested a review from silenceqi January 10, 2025 09:22
medcl
medcl previously requested changes Jan 12, 2025
Copy link
Member

@medcl medcl left a comment

Choose a reason for hiding this comment

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

Fix conflicts

@luohoufu luohoufu requested a review from medcl January 14, 2025 05:11
@silenceqi silenceqi merged commit 8da176b into main Jan 14, 2025
6 checks passed
@silenceqi silenceqi deleted the format_pr branch January 14, 2025 06:29
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