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

feat: Add linting workflow and fix lint issues #18

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

sinadarbouy
Copy link
Contributor

Description

Closes #6

This PR introduces workflow linting and fixes various lint issues:

Changes

  • Added MegaLinter workflow with specific linters enabled:
    • YAML_PRETTIER
    • KUBERNETES_HELM
    • KUBERNETES_KUBESCAPE
    • KUBERNETES_KUBECONFORM
    • SPELL_PROSELINT
    • JSON_JSONLINT
    • MARKDOWN_MARKDOWNLINT
  • Fixed lint issues:
    • Added default resource limits/requests
    • Added security context for test pods
    • Cleaned up YAML formatting
    • Updated checksum in gatewayd_plugins.yaml

Testing

  • The linting workflow has been tested locally
  • All lint issues have been resolved and validated

Additional Notes

  • MegaLinter reports will be archived as artifacts for each run
  • YAML Prettier is configured to exclude Chart.yaml and template files to prevent unwanted formatting

- Add GitHub Action workflow with MegaLinter for automated validation
- Configure specific linters:
  - YAML_PRETTIER for YAML formatting
  - KUBERNETES_HELM for Helm chart validation
  - KUBERNETES_KUBESCAPE for security scanning
  - KUBERNETES_KUBECONFORM for K8s manifest validation
  - SPELL_PROSELINT for prose linting
  - JSON_JSONLINT for JSON validation
  - MARKDOWN_MARKDOWNLINT for documentation

- Set up artifact upload for linter reports
- Exclude Chart.yaml and templates from YAML formatting
- Remove trailing whitespace and extra newlines
- Add default resource limits and requests (100m CPU, 128Mi memory)
- Add security context and resource limits to test pod
- Format YAML files for better readability
- Update plugin checksum in gatewayd_plugins.yaml
Copy link
Member

@mostafa mostafa left a comment

Choose a reason for hiding this comment

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

LGTM! 🙏🎉

@mostafa mostafa merged commit e76a27e into gatewayd-io:main Nov 23, 2024
2 checks passed
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.

Add formatting and linting jobs
2 participants