Skip to content

biome_error_fix#1106

Open
rohan-019 wants to merge 6 commits intoSalamLang:mainfrom
rohan-019:fix_biome_formate_error
Open

biome_error_fix#1106
rohan-019 wants to merge 6 commits intoSalamLang:mainfrom
rohan-019:fix_biome_formate_error

Conversation

@rohan-019
Copy link
Contributor

Description

fixes super linter error that found in biome_formate

Related Issue

Fixes: #1078

Proposed Changes

Outline the changes made in this pull request and explain their purpose.

Checklist

  • I have tested these changes locally.
  • My code follows the project's coding style guidelines.
  • I have reviewed my own code to ensure quality.
  • Unnecessary comments were removed.

Signed-off-by: rohan-019 <rohan18126@gmail.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @rohan-019, 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 resolves a linter error by transitioning the project's JSON formatting from a custom Python script to the Biome formatting tool. The change introduces a dedicated function to invoke Biome for specified files, enhancing code consistency and leveraging a specialized external formatter. It also includes checks to gracefully handle scenarios where Biome might not be installed, providing user guidance.

Highlights

  • JSON Formatting Migration: The custom Python-based JSON beautification logic has been replaced with an integration of the external Biome formatter.
  • New Functionality: A new function, format_with_biome, has been introduced to handle the execution of the Biome formatter, including checks for its availability on the system.
  • Main Function Update: The main function now calls format_with_biome to process JSON files, ensuring that the new formatting approach is utilized.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@rohan-019
Copy link
Contributor Author

cc @jbampton

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 replaces a manual JSON formatting implementation with a call to the biome tool. This is a good change for standardization. However, the new implementation has a flaw in its error handling: a failure in the optional formatting step will cause the entire script to exit. My review includes a suggestion to fix this by handling formatting errors gracefully, ensuring the script can continue even if biome fails to format a file.

@jbampton jbampton self-assigned this Oct 2, 2025
@jbampton jbampton added this to the Salam Hacktoberfest milestone Oct 2, 2025
Copy link
Member

@jbampton jbampton left a comment

Choose a reason for hiding this comment

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

https://biomejs.dev/recipes/git-hooks/#pre-commit

Can we integrate all this with pre-commit ?

@rohan-019
Copy link
Contributor Author

https://biomejs.dev/recipes/git-hooks/#pre-commit

Can we integrate all this with pre-commit ?

hey @jbampton,
I’ll update the .pre-commit-config.yaml to include the Biome hook

Signed-off-by: rohan-019 <rohan18126@gmail.com>
rohan-019 and others added 2 commits October 3, 2025 01:32
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
@BDadmehr0
Copy link
Member

Good improvement replacing the custom JSON formatter with Biome for consistency. One concern: the current implementation exits if Biome fails, which makes the whole script stop. It would be better to handle errors gracefully (log a warning, continue execution). Also nice to see the pre-commit integration being added.

@jbampton @rohan-019

Signed-off-by: rohan-019 <rohan18126@gmail.com>
@rohan-019
Copy link
Contributor Author

cc @jbampton @BDadmehr0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Super-Linter: Errors found in BIOME_FORMAT

3 participants