Skip to content

Conversation

@shindonghwi
Copy link
Contributor

Summary

  • Fix swag fmt --dir ../ not formatting files when using relative parent path
  • The excludeDir function incorrectly treated .. as a hidden folder because it checked if path starts with . and has length > 1

Changes

  • Modified hidden folder detection to exclude .. from being treated as hidden
  • Added test case for relative path formatting

Fixes #2112

The excludeDir function incorrectly treated ".." as a hidden folder
because it checked if the path starts with "." and has length > 1.
This caused `swag fmt --dir ../` to skip the parent directory entirely.

Fixes swaggo#2112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Swag Fmt ignores --dir option

1 participant