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

Support excluding generated files from dartfmt checks #169

Open
Pacane opened this issue Jul 12, 2019 · 5 comments
Open

Support excluding generated files from dartfmt checks #169

Pacane opened this issue Jul 12, 2019 · 5 comments

Comments

@Pacane
Copy link

Pacane commented Jul 12, 2019

Is there a way to make mono_repo presubmit honor the excluded files of each mono_pkg?

I'm getting warnings in generated files that are excluded in analysis_options.yaml.

Same thing happens with the dartfmt task. I'd like to exclude patterns for both these tasks.

@natebosch
Copy link
Member

I'm getting warnings in generated files that are excluded in analysis_options.yaml.

Do you get the same when you run dartanalyzer directly? If so there probably isn't much we can do about it.

@Pacane
Copy link
Author

Pacane commented Jul 19, 2019

Turns out it is a duplicate of this

The analyzer cli doesn't honor them either.

@natebosch natebosch changed the title Honor analysis_options.yaml excluded files for dartfmt and dartanalyzer Support excluding generated files from dartfmt checks Jul 24, 2019
@natebosch
Copy link
Member

Updated the title to reflect the bits that we could change in this repo.

Can you expand on your use case for having non-formatted generated Dart files? Typically we set up our code generators to automatically emit formatted output...

@chandler37
Copy link

Updated the title to reflect the bits that we could change in this repo.

Can you expand on your use case for having non-formatted generated Dart files? Typically we set up our code generators to automatically emit formatted output...

I do not wish to change the generated protocol buffer *.dart files that are produced by https://github.com/dart-lang/protobuf/tree/master/protoc_plugin.

It is more than just line length with those files, so dartfmt -l 120 does not solve the problem. dartfmt creates extensive modifications.

@nstrelow
Copy link

nstrelow commented Jul 3, 2020

Is there any work or open issue for dart-lang/sdk for this?

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

No branches or pull requests

4 participants