-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Bash support #2532
base: main
Are you sure you want to change the base?
feat: Bash support #2532
Conversation
WalkthroughThe recent changes introduce support for Bash scripting into the Tabby project. Enhancements include updating configuration files to recognize Bash language, adding a relevant parser dependency, defining function structures, and updating documentation to reflect the newfound support. This integration allows for better handling and parsing of Bash scripts within the Tabby ecosystem. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- crates/tabby-common/assets/languages.toml (1 hunks)
- crates/tabby-scheduler/Cargo.toml (1 hunks)
- crates/tabby-scheduler/queries/bash.scm (1 hunks)
- crates/tabby-scheduler/src/code/languages.rs (1 hunks)
- website/docs/programming-languages.md (1 hunks)
Files skipped from review due to trivial changes (2)
- crates/tabby-scheduler/Cargo.toml
- crates/tabby-scheduler/src/code/languages.rs
Additional context used
LanguageTool
website/docs/programming-languages.md
[style] ~7-~7: Specify a number, remove phrase, or simply use “many” or “numerous”
Context: ...Languages Most models nowadays support a large number of programming languages (thanks to [The S...(LARGE_NUMBER_OF)
[uncategorized] ~34-~34: A punctuation mark might be missing here.
Context: ...om/) * PHP * C# * Solidity: Si...(AI_EN_LECTOR_MISSING_PUNCTUATION)
[uncategorized] ~37-~37: A punctuation mark might be missing here.
Context: ...Dart: Since v0.12.0 * Lua: Since v0.14.0...(AI_EN_LECTOR_MISSING_PUNCTUATION)
Markdownlint
website/docs/programming-languages.md
20-20: null
Bare URL used(MD034, no-bare-urls)
12-12: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
16-16: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
Additional comments not posted (3)
crates/tabby-scheduler/queries/bash.scm (1)
2-2
: Correct implementation of tree-sitter query for Bash function definitions.This query correctly captures function definitions in Bash scripts, which is essential for the new Bash support.
website/docs/programming-languages.md (1)
39-39
: Update to supported languages list to include Bash.The addition of Bash to the list of supported languages is accurately documented, reflecting the changes made in this PR.
crates/tabby-common/assets/languages.toml (1)
319-349
: Proper configuration for Bash language support.The settings for the Bash language, including file extensions and top-level keywords, are correctly specified and appropriate for Bash scripting.
it seems the test if failing
Could you try fix it? maybe it's a configuratiohn mistake in config.toml |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
Files selected for processing (2)
- crates/tabby-common/assets/languages.toml (2 hunks)
- website/docs/programming-languages.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- crates/tabby-common/assets/languages.toml
Additional context used
LanguageTool
website/docs/programming-languages.md
[style] ~7-~7: Specify a number, remove phrase, or simply use “many” or “numerous”
Context: ...Languages Most models nowadays support a large number of programming languages (thanks to [The S...(LARGE_NUMBER_OF)
[uncategorized] ~34-~34: A punctuation mark might be missing here.
Context: ...om/) * PHP * C# * Solidity: Si...(AI_EN_LECTOR_MISSING_PUNCTUATION)
[uncategorized] ~37-~37: A punctuation mark might be missing here.
Context: ...Dart: Since v0.12.0 * Lua: Since v0.14.0...(AI_EN_LECTOR_MISSING_PUNCTUATION)
Markdownlint
website/docs/programming-languages.md
20-20: null
Bare URL used(MD034, no-bare-urls)
12-12: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
16-16: null
Emphasis used instead of a heading(MD036, no-emphasis-as-heading)
Additional comments not posted (1)
website/docs/programming-languages.md (1)
39-39
: Ensure consistency in punctuation for language listings.The entries for Lua and Bash are missing colons after the language name, which is inconsistent with other entries.
- * [Lua](https://www.lua.org): Since v0.14.0 + * [Lua](https://www.lua.org): Since v0.14.0: - * [Bash / shellscript](https://www.gnu.org/software/bash/): Since v0.14.0 + * [Bash / shellscript](https://www.gnu.org/software/bash/): Since v0.14.0:
seems to be some issue with the tests.. not sure how any of that works... |
Then it seems the tree-sitter-bash implementation is somewhat broken and caused the breakage? |
Could be wrong, but I don't think it's the library. The test fails at: code::intelligence::tests::test_create_source_file It seems that some test suite does not know how to create a test file in the bash scripting language. I don't know anything about this test suite though. |
support for bash shell scripting language
I think the only tag type applicable to scripts is function definitions; tree-sitter is all new to me so might want to have a look over that.
Also, while bash scripts commonly end in
.sh
, they often have no file extension, but are instead identified by the file beginning with#!/bin/bash
,#!/bin/sh
or similar (they are also normally marked as executable). Not sure if there is any way to support looking for these attributes instead of just the filename.Summary by CodeRabbit