diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05ad4faa..a6211f34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -45,15 +45,11 @@ jobs: run: ./scripts/build.sh "${{ matrix.settings.target }}" "${{ matrix.settings.asset_path }}" shell: bash - - name: Set output - id: vars - run: echo ::set-output name=app_version::${GITHUB_REF#refs/heads/release/} - - name: Upload release asset uses: softprops/action-gh-release@v1 with: generate_release_notes: true - tag_name: ${{ steps.vars.outputs.app_version }} + tag_name: ${GITHUB_REF#refs/heads/release/} files: ./bin/${{ matrix.settings.asset_path }}.tar.gz draft: false prerelease: true diff --git a/ftplugin/sh.vim b/ftplugin/sh.vim index 2e18fa86..26972d97 100644 --- a/ftplugin/sh.vim +++ b/ftplugin/sh.vim @@ -9,7 +9,7 @@ set cpoptions&vim let b:doge_parser = 'bash' let b:doge_insert = 'above' -let b:doge_supported_doc_standards = 'google' +let b:doge_supported_doc_standards = ['google'] let b:doge_doc_standard = doge#buffer#get_doc_standard('sh') let &cpoptions = s:save_cpo diff --git a/helper/Cargo.lock b/helper/Cargo.lock index 9d1ba411..67099889 100644 --- a/helper/Cargo.lock +++ b/helper/Cargo.lock @@ -657,7 +657,7 @@ dependencies = [ [[package]] name = "tree-sitter-php" version = "0.19.1" -source = "git+https://github.com/tree-sitter/tree-sitter-php#d38adb26304d9b9d38e9a3b4aae0ec4b29bf9462" +source = "git+https://github.com/amaanq/tree-sitter-php?branch=fix-conflicts#145d04fced5d45be133e8a38aedf2830585053ba" dependencies = [ "cc", "tree-sitter", diff --git a/helper/Cargo.toml b/helper/Cargo.toml index 74b0376a..c1403802 100644 --- a/helper/Cargo.toml +++ b/helper/Cargo.toml @@ -15,7 +15,7 @@ serde = { version = "1.0.104", features = ["derive"] } serde_json = "1.0.99" serde_yaml = "0.9.22" tree-sitter = "0.20.10" -tree-sitter-php = { git = "https://github.com/tree-sitter/tree-sitter-php" } +tree-sitter-php = { git = "https://github.com/amaanq/tree-sitter-php", branch = "fix-conflicts" } tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash" } tree-sitter-lua = { git = "https://github.com/Azganoth/tree-sitter-lua" } tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby" } diff --git a/helper/src/docblock.rs b/helper/src/docblock.rs index 33403c2d..d7e53acf 100644 --- a/helper/src/docblock.rs +++ b/helper/src/docblock.rs @@ -6,7 +6,7 @@ use crate::config::load_doc_config_str; use crate::tokens::replace_tokens; use crate::base_parser::BaseParser; -// use crate::bash::parser::BashParser; +use crate::bash::parser::BashParser; use crate::c::parser::CParser; use crate::cpp::parser::CppParser; use crate::csharp::parser::CSharpParser; @@ -127,7 +127,7 @@ pub fn generate( let parser: Box = match parser_name { "php" => Box::new(PhpParser::new(code, line, &node_types, options)) as Box, - // "bash" => Box::new(BashParser::new(code, line, &node_types)) as Box, + "bash" => Box::new(BashParser::new(code, line, &node_types)) as Box, "lua" => Box::new(LuaParser::new(code, line, &node_types)) as Box, "ruby" => Box::new(RubyParser::new(code, line, &node_types)) as Box, "rust" => Box::new(RustParser::new(code, line, &node_types)) as Box, diff --git a/helper/src/lib.rs b/helper/src/lib.rs index 71cf6ccd..09fedbfb 100644 --- a/helper/src/lib.rs +++ b/helper/src/lib.rs @@ -4,6 +4,8 @@ pub mod config; pub mod docblock; pub mod base_parser; +pub mod bash; +pub mod php; pub mod lua; pub mod ruby; pub mod rust; @@ -13,5 +15,3 @@ pub mod python; pub mod c; pub mod cpp; pub mod typescript; -pub mod php; -// pub mod bash; diff --git a/test/filetypes/sh/functions.vader b/test/filetypes/sh/functions.vader index 4bbc8ea7..1d2ed820 100644 --- a/test/filetypes/sh/functions.vader +++ b/test/filetypes/sh/functions.vader @@ -1,26 +1,68 @@ -" # ============================================================================== -" # Regular functions. -" # ============================================================================== -" Given sh (regular functions): -" function test { -" echo "foobar" -" } -" -" Do (trigger doge): -" \ -" -" Expect sh (generated comments with a descriptios and 'Globals', 'Arguments' and 'Returns' keywords): -" ################################################################################ -" # [TODO:description] -" # Globals: -" # [TODO:variable name] -" # Arguments: -" # $1: [TODO:description for each parameter] -" # Outputs: -" # [TODO:description for each output variable] -" # Returns: -" # [TODO:description] -" ################################################################################ -" function test { -" echo "foobar" -" } +# ============================================================================== +# Regular functions. +# ============================================================================== +Given sh (regular functions): + function foo { + echo "foo" + } + + function bar() { + echo "bar" + } + + baz() { + echo "baz" + } + +Do (trigger doge): + \ + :16\ + \ + :31\ + \ + +Expect sh (generated comments with a descriptios and 'Globals', 'Arguments' and 'Returns' keywords): + ################################################################################ + # [TODO:description] + # Globals: + # [TODO:variable name] + # Arguments: + # $1: [TODO:description for each parameter] + # Outputs: + # [TODO:description for each output variable] + # Returns: + # [TODO:description] + ################################################################################ + function foo { + echo "foo" + } + + ################################################################################ + # [TODO:description] + # Globals: + # [TODO:variable name] + # Arguments: + # $1: [TODO:description for each parameter] + # Outputs: + # [TODO:description for each output variable] + # Returns: + # [TODO:description] + ################################################################################ + function bar() { + echo "bar" + } + + ################################################################################ + # [TODO:description] + # Globals: + # [TODO:variable name] + # Arguments: + # $1: [TODO:description for each parameter] + # Outputs: + # [TODO:description for each output variable] + # Returns: + # [TODO:description] + ################################################################################ + baz() { + echo "baz" + }