-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ci: add local script to run super-linter #1289
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @ognis1205, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant improvement to the developer workflow by adding a local script for running the GitHub Super Linter. This script leverages Docker to replicate the exact linting environment used in the CI pipeline, ensuring that developers can catch and resolve linting issues on their local machines before submitting code. The primary goal is to enhance consistency, prevent unexpected CI failures, and provide a smoother development experience without altering any functional source code or existing CI behavior. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a helpful script for running the super-linter locally, which is a great addition for improving the developer workflow and catching linting issues before CI. The script is well-structured and mirrors the CI configuration as intended. I have a few suggestions to enhance its robustness and usability, primarily around pinning the Docker image version to ensure reproducible builds and making the output more user-friendly. Overall, great work!
|
@gemini-code-assist Can you recommend a way to accomplish this task without duplicating the settings across lint.yaml and this new lint.sh ? |
|
That's an excellent question, @holtskinner! Duplication of configuration settings between the CI workflow and local scripts is a common challenge, and it's great you're thinking about how to streamline this. The GitHub Super Linter action supports configuration via a Here's how you can achieve this:
This approach centralizes the majority of your Super Linter configuration into a single file, making it much easier to maintain consistency between your local development environment and your CI pipeline. |
|
Thanks for the great question @holtskinner , really appreciated!
Because of that, I updated the implementation so that both |
0eadac2 to
5b674e5
Compare
|
I updated the implementation so that both Would appreciate a quick look when you have time and please let me know if this approach/PR doesn't make sense or if you see a better alternative. |
5b674e5 to
7973e9d
Compare
Signed-off-by: Shingo OKAWA <shingo.okawa.g.h.c@gmail.com>
7973e9d to
e2829fd
Compare
Summary
This PR adds a local helper script (
scripts/lint.sh) to run GitHub Super Linter in a Docker container.It mirrors the configuration used in our CI workflow, allowing contributors to validate linting rules locally before opening a Pull Request.
Details
scripts/lint.shfor running Super Linter locally.github/workflows/linter.yamlMotivation
The CI lint job sometimes fails due to rule violations that are hard to reproduce locally.
This script ensures consistent developer experience by enabling contributors to run the exact same linter setup.
Notes
Closes #1290