Skip to content

Set working directory to the parent directory of formatted file#24

Merged
fourls merged 1 commit into
integrated-application-development:masterfrom
zaneduffield:better-working-directory
May 14, 2025
Merged

Set working directory to the parent directory of formatted file#24
fourls merged 1 commit into
integrated-application-development:masterfrom
zaneduffield:better-working-directory

Conversation

@zaneduffield
Copy link
Copy Markdown
Contributor

This allows pasfmt to choose a config file closer to the file being
formatted.

Since an editor always has a filename (even before a new file is saved)
we can rely on extracting the directory this way and don't need to fall
back to the project directory.

Fixes #11.

@zaneduffield zaneduffield requested a review from fourls April 23, 2025 23:39
@zaneduffield
Copy link
Copy Markdown
Contributor Author

Ah, I forgot to update the changelog

@zaneduffield zaneduffield force-pushed the better-working-directory branch from a082920 to 071208b Compare April 23, 2025 23:41
fourls
fourls previously approved these changes May 14, 2025
Copy link
Copy Markdown
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - happy to merge after a rebase to fix the changelog.

This allows pasfmt to choose a config file closer to the file being
formatted.

Since an editor always has a filename (even before a new file is saved)
we can rely on extracting the directory this way and don't need to fall
back to the project directory.
Copy link
Copy Markdown
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@fourls fourls merged commit ccd755c into integrated-application-development:master May 14, 2025
1 check passed
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.

Config file location

2 participants