Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass the file path to the formatter #32

Closed
wants to merge 1 commit into from

Conversation

ngan
Copy link
Contributor

@ngan ngan commented Oct 6, 2020

What are you trying to accomplish?

I can't get the check to finish on our repo because there are parsing errors (on both packwerk and our code). But when it errors, I can't tell where it's at. I've been adding puts to the cli. While I was there, I thought it'd make sense for the cli to pass along the path to the formatter in case someone wants to make a document-style formatter.

What approach did you choose and why?

This is similar to how RSpec (and others) formatter works.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code refactor (non-breaking change that doesn't add functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • It is safe to simply rollback this change.

@ngan ngan requested a review from a team as a code owner October 6, 2020 15:56
@ngan ngan mentioned this pull request Oct 6, 2020
6 tasks
@tomstuart
Copy link
Contributor

Thank you for your contribution @ngan! It’s a good idea but I’m inclined not to merge it yet because we don’t know whether anyone is planning to contribute a formatter that needs this information, and in the meantime it’s not serving any purpose in the codebase. Do you have any immediate plans to use it?

@ngan
Copy link
Contributor Author

ngan commented Oct 13, 2020

because we don’t know whether anyone is planning to contribute a formatter that needs this information

That's fair! I was running into parsing errors and was trying to find the cleanest place to puts the error info (line num, etc) and I thought it was best in the formatter.

I'll take a crack at this: #19 since we actually need it...

@tomstuart
Copy link
Contributor

Cool, thanks. I’ll close this PR for now to help us with triage, but we can reopen later if you need it to be merged for whatever comes out of #19.

@tomstuart tomstuart closed this Oct 13, 2020
shioyama pushed a commit that referenced this pull request May 21, 2021
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.

2 participants