From 269073d1c996cd766f066f825fb72b90b0d712b0 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 24 Aug 2023 23:56:13 +0200 Subject: Fix yard documentation warnings [ci skip] Close #298 --- lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb | 2 +- lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb | 4 ++-- lib/axlsx/workbook/worksheet/auto_filter/sort_state.rb | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb b/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb index 56192336..586dc711 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb @@ -110,7 +110,7 @@ module Axlsx @sort_state ||= SortState.new self end - # @param [Boolean] Flag indicating whether the AutoFilter should sort the rows when generating the + # @param [Boolean] v Flag indicating whether the AutoFilter should sort the rows when generating the # file. If false, the sorting rules will need to be applied manually after generating to alter # the order of the rows. # @return [Boolean] diff --git a/lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb b/lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb index 1d5e9241..8704dbdd 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb @@ -5,8 +5,8 @@ module Axlsx class SortCondition # Creates a new SortCondition object # @param [Integer] column_index Zero-based index indicating the AutoFilter column to which the sorting should be applied to - # @param [Symbol] The order the column should be sorted on, can only be :asc or :desc - # @param [Array] An array containg a custom sorting list in order. + # @param [Symbol] order The order the column should be sorted on, can only be :asc or :desc + # @param [Array] custom_list An array containg a custom sorting list in order. def initialize(column_index:, order:, custom_list:) Axlsx.validate_int column_index @column_index = column_index diff --git a/lib/axlsx/workbook/worksheet/auto_filter/sort_state.rb b/lib/axlsx/workbook/worksheet/auto_filter/sort_state.rb index baa6c134..71e03b00 100644 --- a/lib/axlsx/workbook/worksheet/auto_filter/sort_state.rb +++ b/lib/axlsx/workbook/worksheet/auto_filter/sort_state.rb @@ -6,7 +6,7 @@ module Axlsx # This class performs sorting on a range in a worksheet class SortState # creates a new SortState object - # @param [AutoFilter] the auto_filter that this sort_state belongs to + # @param [AutoFilter] auto_filter the auto_filter that this sort_state belongs to def initialize(auto_filter) @auto_filter = auto_filter end @@ -20,8 +20,8 @@ module Axlsx # Adds a SortCondition to the sort_state. This is the recommended way to add conditions to it. # It requires a column_index for the sorting, descending and the custom order are optional. # @param [Integer] column_index Zero-based index indicating the AutoFilter column to which the sorting should be applied to - # @param [Symbol] The order the column should be sorted on, can only be :asc or :desc - # @param [Array] An array containg a custom sorting list in order. + # @param [Symbol] order The order the column should be sorted on, can only be :asc or :desc + # @param [Array] custom_list An array containg a custom sorting list in order. # @return [SortCondition] def add_sort_condition(column_index:, order: :asc, custom_list: []) sort_conditions << SortCondition.new(column_index: column_index, order: order, custom_list: custom_list) -- cgit v1.2.3 From a4742a07dad0d88c07c6d827527a7086c1c33509 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 2 Sep 2023 11:18:45 +0200 Subject: Add Yard Linter action --- .github/workflows/yard.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/yard.yml diff --git a/.github/workflows/yard.yml b/.github/workflows/yard.yml new file mode 100644 index 00000000..61e27f46 --- /dev/null +++ b/.github/workflows/yard.yml @@ -0,0 +1,32 @@ +name: YARD + +on: + push: + branches: ['*'] + pull_request: + branches: ['*'] + +permissions: + contents: read + +jobs: + rubocop: + name: YARD + runs-on: ${{ matrix.os }} + env: + BUNDLE_JOBS: 4 + BUNDLE_RETRY: 3 + strategy: + matrix: + os: [ubuntu-latest] + ruby-version: ['3.2'] + + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Lint YARD documentation + run: bundle exec yard doc --fail-on-warning --no-output --no-progress -- cgit v1.2.3