summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/yard.yml32
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb4
-rw-r--r--lib/axlsx/workbook/worksheet/auto_filter/sort_state.rb6
4 files changed, 38 insertions, 6 deletions
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
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)