sommerfeld-io-archive / source2adoc

Streamline the process of generating AsciiDoc documentation from inline comments within source code files. This tool converts inline documentation into AsciiDoc files, tailored for seamless integration with Antora.
https://source2adoc.sommerfeld.io
Other
0 stars 0 forks source link

Extend `--exclude` to accept wildcards #109

Open sebastian-sommerfeld-io opened 1 month ago

sebastian-sommerfeld-io commented 1 month ago

:zap: As a role I can capability, so that receive benefit.

Acceptance Criteria (executable specification)

:zap: Write the Acceptance Criteria ... The Scenarios names are pointing in the right direction, but are nowhere near ready for implementation.

Feature: :zap: todo ...

  As a _role_ I can _capability_, so that _receive benefit_.

  Background:
    Given todo ...

  Scenario: Wildcards as part of the file name (`*.sh`) to exclude all files that match the pattern in all folders
    Given todo ...
    When todo ...
    Then todo ...

  Scenario: Wildcards as part of the file name but with path (`some/path/to/sources/*.sh`) to exclude all files that match the pattern in all folders
    Given todo ...
    When todo ...
    Then todo ...

  Scenario: Wildcards as part of the path (`some/**/to/sources`) to exclude all files that match the pattern in all folders
    Given todo ...
    When todo ...
    Then todo ...

Acceptance Criteria (additional)

sebastian-sommerfeld-io commented 1 month ago

Sample ... Needs Refinement

  # TODO https://github.com/sommerfeld-io/source2adoc/issues/109
  Scenario Outline: Exclude files or folders that match a specific pattern
    Given I specify "<pattern>" using the --exclude flag
    When I run the app
    Then exit code should be 0
    And AsciiDoc files should be generated for all source code files
    But the tool should not generate AsciiDoc files for all files matching the pattern in any directory

    Examples:
      | pattern  |
      | *.sh     |
      | prefix-* |

  # TODO https://github.com/sommerfeld-io/source2adoc/issues/109
  Scenario Outline: Exclude files or folders that match a specific pattern within a particular directory
    Given I specify "<pattern>" using the --exclude flag
    When I run the app
    Then exit code should be 0
    And AsciiDoc files should be generated for all source code files
    But the tool should not generate AsciiDoc files for all files matching the pattern in the specified directory

    Examples:
      | pattern                  |
      | src/main/*.sh            |
      | src/main/prefix-*        |
      | src/main/**/sources      |
      | src/main/**/sources/*.sh |